Search code examples
ios6swiftios8app-store-connectios-app-extension

How to make a objective-c written iOS app containing a swift-written app extension while still supporting iOS 6?


Is that even possible?

I made an archive, validated & pushed it to itunes connect and I got a mail saying:

Invalid Deployment Target - Apps built with Swift must have a Deployment Target of 7.0 or later.

I get that swift is not supported on iOS 6 but since extensions are not either, doing this should be possible no?

The containing app itself is still entirely written in Objective-C.

I'm aware that extensions are available only on iOS 8.


Solution

    1. Extension is a new feature in iOS 8 and it does not support iOS 7 and below. See https://developer.apple.com/library/ios/documentation/General/Conceptual/ExtensibilityPG/index.html#//apple_ref/doc/uid/TP40014214-CH20-SW1

    2. Your app extension is written in swift. And Swift only support iOS 7+. See Swift with iOS 5 deployment target

    So the answer is not possible. It also doesn't matter if your project is written in objective-c because of the above reasons.

    Updated: it's probably good to just follow the instruction from iTunes connect to get your app approved.