Thursday, September 24, 2015

Swift 2 Bloat in the Twitter App

Nolan O’Brien:

Twitter app sizes:
w/ Swift 1.2 = 65MB
w/ Swift 2.0 = 125 MB
Thinned w/ Swift 2 = 77 MB

Epiphany: App thinning counters Swift 2.0 bloat

It’s not clear to me why this is happening, but it sounds like both the Swift libraries and the compiled code for the app itself are larger than before.

It seems entirely possible that overall system performance would decrease if more apps used Swift. The binaries are larger, so they’ll take up more storage space and RAM. They’re calling back and forth to Objective-C a lot, so they won’t see many benefits from pure Swift not doing message sending, and they may incur extra overhead due to bridging. Writing the code may be faster, though.

Update (2015-09-24): Apple:

App slicing is currently unavailable for iOS 9 apps due to an issue affecting iCloud backups created from iOS 9 where some apps from the App Store would only restore to the same model of iOS device.

When a customer downloads your iOS 9 app, they will get the Universal version of your app, rather than the variant specific for their device type.

1 Comment RSS · Twitter

A local build of an app includes the swift dylibs distributed by Xcode. These libraries include bitcode and other metadata that never makes it onto a customer device.

Leave a Comment