I want to add an 80 MB framework to my iOS App that is currently about 30 MB. Will the size of my app be 110 MB?
Short answer:
You'll have to add the SDK and compile the code to see what your resulting size is.
Details:
When you build an app, the compiler rewrites it into machine-readable code, doing some further magic to optimize the end result. Because of this, the size of your code files, including SDK files, has no relationship whatsoever to the completed app executable's size.
For one example, your code may have tons of comments in it. However, the compiler wouldn't even look at those comments when producing the final app.
Additionally, an app compiled for debug
will be larger than the same app compiled for release
. That's because the compiler will leave some things in the debug
version for troubleshooting that it does not include in a final release
version.
As noted in some of the comments, when you submit your code to the Store, it may be further "trimmed", possibly ending up with an even smaller size. (In very simple terms, Apple has found a way to share common base code between apps on a device. The common code is removed from apps submitted to the store, since the apps can use that central base code instead. This results in smaller, faster apps.)
There are various things you can do to optimize an app into the smallest possible footprint, just as there are ways you can optimize an app to be faster or more responsive. Doing so, though, is totally dependent on the tools you're using, the statements you use, the way you import items, etc. You would have to consider these items individually. (For example, are you using the best structure for a task - array?, dictionary?, set? Are you using the most efficient method to perform a task? There's this whole "Big-O" thing... ;)