7

When I distribute application through Crashlytics then application has size about 115MB. But when I distribute app through Xcode to ipa file, after install through iTunes then application has 35 MB.

Could someone explain to me this behaviour?

Application have wrote on Obj-C, but app has iOS-chart library(on Swift).

NSPratik
  • 4,294
  • 5
  • 43
  • 74
Andrei
  • 114
  • 6

1 Answers1

7

I would guess you are using App Thinning which means you build for multiple CPU architectures but only the code of the architecture of the install device is used when installing the app. It's designed to cutdown on the app size on the device.

The stripping is performed by the App Store, so if you install via Crashlytics you by-pass the App Store and the stripping is not performed, hence the difference in install size.

trojanfoe
  • 116,099
  • 18
  • 197
  • 233
  • Thanks a lot for answer! The Resources size is about 3MB. Do you think that App Thinning could help me? – Andrei Jan 29 '16 at 08:15
  • 1
    @Andrei Well you firstly need to confirm my suspicion that you are already using App Thinning. Check if ENABLE_BITCODE is set in the build settings (see [this question](http://stackoverflow.com/questions/30722606/what-does-enable-bitcode-do-in-xcode-7)). – trojanfoe Jan 29 '16 at 08:17
  • @Andrei OK, so that looks like the reason for the difference in size. It's not got anything to do with Crashlytics as that will add very little to the size and to answer your question, it won't make any difference to the resource size as those resources will be used in app versions of the app. – trojanfoe Jan 29 '16 at 08:29
  • OK, thanks a lot! But I still not understand what exactly affects this size Crashlytics and ipa file. But I hope that in AppStore this application will to have size less then 100MB. – Andrei Jan 29 '16 at 08:35
  • @Andrei I don't believe it's got anything to do with Crashlytics. The app store will strip unneeded CPU architectures from the code before installing it (and presumably when displaying the size of the app), so it's all about app thinning and the app store. – trojanfoe Jan 29 '16 at 08:37
  • Ok, but now I've seen size of application in Settings. And if we've installed through Crashlytics then app size is about 120 MB. But if I dropped down ipa through iTunes then in Settings I able see about 30 MB :) – Andrei Jan 29 '16 at 08:39
  • @Andrei But when you install via Crashlytics you have by-passed the app store haven't you. It's the app store that does the stripping. – trojanfoe Jan 29 '16 at 08:44
  • 1
    @trojanfoe it seems "The app store will strip unneeded CPU architectures from the code before installing it" is the reason..? because crashlytics is not doing the same. – Ankit Srivastava Jan 29 '16 at 09:00
  • 1
    @AnkitSrivastava Yes. I have stated that in the answer. – trojanfoe Jan 29 '16 at 09:00
  • @Andrei When I enable BITCODE, .ipa size is much more than original. Can app store consider whole .ipa size OR will consider STRIP down size.Please help and answer this question : https://stackoverflow.com/questions/45440520/mobile-app-size-on-apple-app-store-with-bitcode-enabled – Nitesh Aug 01 '17 at 14:38