Reputation: 653
I wrote my first iOS app in 2012 in Objective-C. Its total archive size including the app file, dSYMs file, etc. was less than 1 MB. I recently rewrote it in Swift with Xcode 9 and its archive size is now 160 MB. What is taking up all the space? It's not my code, because the Swift code is very similar to the Objective-C code and is actually a fair amount smaller.
I'm using Google Maps in another app and noticed the archive size is almost a half GB. I thought maybe the Google Maps libraries were taking up all the space until I noticed that all my recent Swift apps are very large as well. My related question is: If I'm enabling Bitcode (as is required), and my .app file size is 200 MB, how much of that is actually downloaded on the user's iPhone?
Upvotes: 4
Views: 976
Reputation: 3658
Apple did this only in iOS 12.2+ and Swift 5. Here's Release Notes. Since iOS 12.2 archives don't include swift libs.
Upvotes: 0
Reputation: 86691
Every Swift app has the Swift runtime statically linked. The reason for this is that they still have not achieved a stable ABI so Swift apps compiled with different versions of the compiler cannot share the same runtime.
Upvotes: 5