24

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

./Payload/Client.app/Frameworks/libswiftCore.dylib
./Payload/Client.app/Frameworks/libswiftCoreAudio.dylib
./Payload/Client.app/Frameworks/libswiftCoreGraphics.dylib
./Payload/Client.app/Frameworks/libswiftCoreImage.dylib
./Payload/Client.app/Frameworks/libswiftDarwin.dylib
./Payload/Client.app/Frameworks/libswiftDispatch.dylib
./Payload/Client.app/Frameworks/libswiftFoundation.dylib
./Payload/Client.app/Frameworks/libswiftObjectiveC.dylib
./Payload/Client.app/Frameworks/libswiftSecurity.dylib
./Payload/Client.app/Frameworks/libswiftUIKit.dylib
./SwiftSupport/libswiftCore.dylib
./SwiftSupport/libswiftCoreAudio.dylib
./SwiftSupport/libswiftCoreGraphics.dylib
./SwiftSupport/libswiftCoreImage.dylib
./SwiftSupport/libswiftDarwin.dylib
./SwiftSupport/libswiftDispatch.dylib
./SwiftSupport/libswiftFoundation.dylib
./SwiftSupport/libswiftObjectiveC.dylib
./SwiftSupport/libswiftSecurity.dylib
./SwiftSupport/libswiftUIKit.dylib

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

Has anyone seen this before? I asked twice on the Apple Developer Forums with no responses.

Stefan Arentz
  • 34,311
  • 8
  • 67
  • 88
  • I'm having this issue as well, any updates? – Bruce Jul 26 '15 at 09:19
  • Nope. Still looking for answers. – Stefan Arentz Jul 26 '15 at 21:56
  • We are also experiencing this issue. We are investigating it - if we got any solution I will post my updates... – orschaef Aug 20 '15 at 12:00
  • Can you provide links to your questions on the Apple Developer Forums? Those of us with Apple Developer accounts can at least see them. Thanks. – chrish Aug 20 '15 at 17:52
  • A year passed and I stumbled on the same issue, trying to add Swift support to our existing huge iOS project and seeing that the libraries are included twice, left a message in Apple forums https://forums.developer.apple.com/thread/16339 (I think it's the original thread the op opened) – Nimrod Gutman Jul 04 '16 at 07:43
  • From watchOS4 size increased by 25MB, so now watch app size limit is 75MB instead of old 50MB https://stackoverflow.com/a/46347141/3759429 – Tejas Ardeshna Oct 04 '17 at 09:34
  • To prevent having multiple copies of Swift libraries in your app, make sure that Embedded Content Contains Swift Code is set to NO in your embedded content. – rolling Ztoned Dec 08 '17 at 13:14

2 Answers2

7

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

Mazyod
  • 22,319
  • 10
  • 92
  • 157
  • From watchOS4 size increased by 25MB, so now watch app size limit is 75MB instead of old 50MB https://stackoverflow.com/a/46347141/3759429 – Tejas Ardeshna Oct 04 '17 at 09:34
1

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.

Laurel
  • 5,965
  • 14
  • 31
  • 57
loretoparisi
  • 15,724
  • 11
  • 102
  • 146
  • Well that's great and all, so why do they still have this ridiculous 50 MB limit on the uploaded binaries? Can't they do this processing and check the final size of the IPA? – devios1 Feb 15 '17 at 20:57
  • From watchOS4 size increased by 25MB, so now watch app size limit is 75MB instead of old 50MB https://stackoverflow.com/a/46347141/3759429 – Tejas Ardeshna Oct 04 '17 at 09:34