How to prevent SwiftSupport libraries to be included twice

When we export our application, Firefox for iOS, to an .ipa file, the SwiftSupport directory is included twice:


This is from the .ipa file that has been built with a Release profile and exported for App Store Distribution.

  • Whatsapp integration and openURL issue in iOS 10
  • FBSOpenApplicationErrorDomain error 1
  • Using AutoLayout, how do I keep a UILabel in the same place when the navigation bar disappears?
  • MPMoviePlayerController deprecated, what now?
  • Max length UITextField
  • soap web service not working in iphone
  • Has anyone seen this before? I asked twice on the Apple Developer Forums with no responses.

    2 Solutions Collect From Internet About “How to prevent SwiftSupport libraries to be included twice”

    Unfortunately, IPA size still matters for the AppleWatch, since it throws a validation error if the size is beyond a measly 50 MB limit (with all the bloat included).

    Fortunately, setting “Embedded content contains Swift” on the Apple Watch application target to NO reduced the Apple Watch size by 16.5 MB, and thus passing validation.

    NOTE: My whole app is written in Swift, with embedded Swift-based framworks. But the code is in the WatchKit extension, not the application!

    I already asked on the forums if this solution is appropriate or not, no responses yet .. Also, I already submitted this build to itunes connect, and it has been processing for 30 mins now (sigh). Will post back here, or remove the answer if I faced issues with this approach.

    You can see in the screenshot below how the WatchKit app is missing the Frameworks folder in the newer archive, removing 16.5 MB

    enter image description here

    According to Apple Technical support about IPA size after moving to Swift 2/iOS9:

    The size of libswiftCore.dylib in your IPA, and the size of your IPA in general, is somewhat meaningless these days. The new thinning features in the store will remove unnecessary content from your app when delivering to specific devices, and libswiftCore.dylib contains bitcode even if your app doesn’t. This bitcode is removed before your app is downloaded to a customer device.

    Despite of this, I agree with Firefox iOS Devs, and I’m experiencing the same issue on the App Store.