How to reduce the itunes app size? - ios

When submitting an app to Apple, i noticed that even though the App bundle is 60 MB, the actual app that shows up on itunes is 54 MB. However, when making the Ad Hoc build, the ipa is only 30 MB.
My understanding is that this is due to DRM that Apple has: https://developer.apple.com/library/ios/qa/qa1795/_index.html
However, is there a better way to bypass this DRM that Apple puts?

Apple just came up with a solution where if you add all your resources (images, videos, etc) to the so called Assets catalog file AND configure each file according to the device type being used THEN you can dramatically reduce app size.
Think about it! You have 3 copies of every image: img.png img#2x.png and img#3x.png
Then why would you need to have the non-retina set of images on a retina device?
And this answers why you see lower app size when you build. xCode does this automatically, but you can fine tune in assets catalog. Here is how:
https://developer.apple.com/library/mac/recipes/xcode_help-image_catalog-1.0/chapters/CustomizingImageSetsforSizeClasses.html#//apple_ref/doc/uid/TP40013303-CH10-SW1
Oh yeah, not only app size reduces! Apple made seamless integration to make the AppStore downloadable app be smaller. By making a custom build for every kind of device. Just use the Assets :)

Related

How to reduce my ipa build size?

I have exported IPA build from Xcode 9.1 and my file size is 168 MB.
I have enabled and disabled bit code feature from build options in Xcode 9.1, But there is no change in IPA build file size it remains same as 168 MB. I am weird about this.
I will appreciate if anyone can help with this.
I really don't understand the concept of App Thinning.
I guess code size is your smallest problem, therefor you don't see much of a change. If you want to have a smaller .ipa, you need to reduce your media files.
"App thinning" is something that happens on Apple site: Simply speaking, if a user downloads your app on a say iPhone, apple kicks out all stuff that does not match to your device, e.g. images for different resolutions than your phone. Therefore, your .ipa still contains all the data, but just the download for the end user is smaller.

Minimize iOS App Size [duplicate]

This question already has answers here:
App size double on archiving iphone
(3 answers)
Closed 5 years ago.
After archiving the build, the build size is almost doubled that of the build generated by dragging and dropping .app to iTunes. Why the build size is increased while archiving. Appreciate the suggestions.TY
The archive includes your debugging symbols .dsym file. Also see this duplicate post and answer.
In addition: assets are the issue in our case. You can in most cases remove meta data from your assets, it's a few kb per assets but with big quantities it adds up. Make sure to save assets for web, photoshop does this better than e.g Sketch, and there are tools like ImageOptim.
I have had that very same question. To be honest I am not sure. It might have something to do with the version for each device or the assets. Do not worry about the size. Once the app gets put onto the App Store the file size will change. One of my apps was 45mb on my simulator and once it was released onto the App Store the file size went down to 21mb. I honestly would not worry about file size unless you have a lot of pictures or videos.
The file size will decrease a lot once it is on the App Store. But if you are really concerned about the app size, there is a way to compress some of the code.
Click here for stackoverflow question that's shows how to do that
Congratulations on your app!
The archived version of the app includes all the assets and compiled code. If you are using Bitcode the size will be large as it will include all the slices of the app. However the downloaded size will differ from the archive size.
This question from Apple support pages also explains how you can determine more accurate file sizes for what the app will actually equal on the App Store.
https://developer.apple.com/library/content/qa/qa1795/_index.html
You might want to have a look into App Thinning to ensure you optimise the size of your app.
https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/AppThinning/AppThinning.html
or here
http://www.imore.com/app-thinning-ios-9-explained
Don't worry about the size. As soon as you upload it to the app store, bitcode will do it work which will make the app a lot smaller.

App size on app store is 7x larger than uploaded app size

When i uploaded my iOS app to app-store, the ipa size was 32 MB. Now my app goes live, now i i checked my app size on app store, it is showing 237 MB on iphone 6, it is showing 252 MB size when i open app link in browser on my PC.
Why this much difference in size of app. Any suggestions?
From Apple:
When your application is approved by Apple to sell on the App Store, it is encrypted for DRM purposes and re-compressed. When the encryption is added, the size of the compressed file will increase. The exact size of the increase will vary from app to app, however, the size increase can be large when the binary contains a lot of contiguous zeros. We are unable to guarantee the size of your file after the encryption has been added.
Source (Expand section View the file sizes of a build (iOS, tvOS):
https://help.apple.com/app-store-connect/?lang=en#/dev3b56ce97c
The current Apple docs on "Reducing Your App’s Size" suggest that
compared to the binary you uploaded, the final size of your app after it’s approved for the App Store may end up being slightly larger. [emphasis added]
A 7x-8x increase seems like an extraordinarily large difference to be explained by simple encryption/recompression, but there are pathological cases. It would be good to know what the uncompressed size of the IPA is, and if there are particular files in the uncompressed version that happen to compress very well, that might compress badly after being encrypted.
If so, compressing those before including them in the IPA and decompressing them at run-time might save significant space -- Apple suggests something like that on their “advanced optimization” page, where they talk about compressing images and audio files.
There's also general advice there and on the “basic optimization” page about using asset catalogs and app thinning to minimize bundling resources that might be unnecessary for a particular device, but that doesn't sound like the problem here.

Archived IPA size for Appstore is larger then Adhoc

I am developing app in swift 2 in xcode 7.3. I used too small images and project is too short it contains only one framework googleMobileAds.framework. My total size of project folder is only 36MB where 31MB is only for googleMobileAds.framework.
Now I want to publish my app on store. but it creates too large ipa with size 31 MB for app store deployment. When i tried to export ipa for adhoc exported IPA file size with 8MB. I searched a lot on google and i got to know that disabling of BITCODE will help I disabled but nothing worked its still 31 MB for App Store Deployement. please tell me how to reduce app size because app is too small thats why I want to reduce app size.
Thanks in advance. :)
App store distribution submissions are uncompressed (and App Store downloads are less compressible than development ipa files), so this is normal and there is nothing you can do (except remove lots of code or data from your app).

2 ipa files for same app (for better size and performance)

I'm working on an iOS application which is developed for all devices (retina and non-retina)
The size of the app is too big now to have compromise for all devices. (Why should iphone 3gs suffer size where it does not get quality?)
Now, I would like to know if there is a way to optimize the size of game installed on the device.
Specifically, is there a way in itunes submission process where we can have additional downloadable content on the server and can download it based on the device ?
We can have assets broken based on the devices and still can save some size on each device.
There is no way to do this thru Apple. The app isn't even necessarily downloaded to a device initially, it might be downloaded to iTunes on a computer instead and synced to the device. Also the user might download it on an iPhone, sync it to iTunes, then sync it to an iPad, so the only time it would actually be downloaded is on the iPhone. So if it didn't include the iPad resources, then the iPad would have a problem running it in this scenario.
You could always have content that the app downloads from your server upon installation, which could reduce the size, but would delay the user starting to use the app upon first run. You could also include only retina assets and generate the non-retina assets upon first run by scaling the images to half size and saving them for subsequent use. This would also take a little bit of time, although probably less time than downloading assets.
You could always break the app into iPhone and iPad versions as well, which would reduce the app size. This would also give you the ability to set a different price point for the iPad version. This is very common and can definitely help reduce app size for all users. This would also be the recommended way of handling this. Note that this means you'll have two separate versions (different app IDs) on the store. Typically people append something like "HD" to the end of the iPad version when they do this.

Resources