Search code examples
iosswiftwatchkit

My iOS app and WatchKit app are entirely Swift. Do I need to change "Embedded Content Contains Swift"?


Currently, it is set to No for all targets: iOS app target, the WatchKit extension and the WatchKit app. Based on this post:

If you use Swift in your iPhone app, be sure to set the "Embedded Content Contains Swift" build setting to NO for your frameworks and extensions and YES for your iPhone app target.

I don't really understand what it does to my app. Do I have to change anything? I have read the document about "Embedded Content Contains Swift". I think this setting is only for apps that are built with both Objective-C and Swift. Am I correct?

By the way, in the linked frameworks and libraries of the iOS app target, I have: iAd, StoreKit and WatchKit. The WatchKit extension and app don't link to anything. I use Xcode 6.3.

Thanks for the help.


Solution

  • You only need to set the Embedded Content Contains Swift flag if you are adding a library or framework that contains Swift code, irrespective of your base-project's language (e.g., Swift or Objective-C).

    More info here: https://developer.apple.com/library/ios/qa/qa1881/_index.html

    For your situation, you don't have to set that flag to yes, as you are not linking to any external Swift libraries.