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

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.

Related

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.

How to reduce app size in iOS?

I know it has been asked many times, but every answer suggests using compressed images or linking to images from the web instead of the resource bundle.
In my app there is only 1.5 MB of images, but still the app has a size of 20.9 MB.
The other files in my app are the following:
2 frameworks (CoreLocation, CoreBluetooth)
2 pods (Fabric, Crashlytics)
8 xib
2 fonts (254KB)
And some Swift and obj-c files
Could anyone help me optimize the size of my app?
I am wondering why my app is so large if there is only 1.5 MB of images and 254KB of fonts? I have some apps on my iPhone which have the same functionality as my app and they only take up 520 KB and 1.6 MB. Does anyone know how the developers of those apps achieved that?
The Swift runtime is included with every app that is currently using Swift and inflates the app size.
Apple doesn't promise code compatibility - but runtime compatibility is promised.
In order to do that the Swift runtime libraries of your compiled code is included with the app. That takes up some space :)
The App Store size might be smaller than Xcode reports. If you upload your build to TestFlight, TestFlight will report a much smaller size (but then tell you the regular App Store version might be larger). With app thinning and bitcode the size of the binary delivered to your user's phones will be smaller than the "full" app size.
Swift's overhead should go away once Swift 5 (https://github.com/apple/swift-evolution) gains ABI compatibility.
Fabric/Crashlytics add a few MB alone. If you build an Archive, then in Finder right-click on the the app and Show Package Contents. From there you can sort by file size and see the biggest culprits.

App Store File Size Warning in iTunes Connect

Version 1.0 of my app has finally been completed. It's a simple application with the ability to view multiple leaflets and links to videos from a charity-based organisation. I've uploaded it to iTunes Connect for the final build, but I'm seeing a "App Store File Size Warning" in iTunes Connect.
The app itself contains 220 images (each has an average size of 500 Kb but some much smaller). The idea of the app is to have the charity's leaflets all accessible within the app in an offline state (hence why they're not downloaded from a server somewhere, etc).
The app itself also contains links to the companies videos. So the videos itself are not in the app, but rather links to the videos are populating the app's UITableViewCells.
Reading many questions about App Store size reduction, I have moved 1200 titles and URLs for the videos to text files rather than storing them in code. I have reduced the sizes of the images (they can't be reduced anymore because they will become low resolution). I'm just not too sure what I can do to get to the required limit? Or, could I still submit as it's only a warning and not an error?
For example, I downloaded a game today that was 190Mb. How does that get around this?
The app supports iOS 7, 8 and 9, so I can't use App Thinning just for that. I see some information on this: Max size of an iOS application but it's not new, etc.
Is it possible for me to bypass the warning in iTunes Connect and submit anyway? (I'll submit after the ITC X mas break).
Any thoughts on this would be really appreciated.
That won't cause any issue. If your app is less than 100 MB the warning won't be there. Apple prefers to keep the IPA size below 100 MB for keeping the app mobile data friendly (To download using mobile data).
There are several ways you can reduce the size:
Use App Thinning
Implement an one time download mechanism in your app, through which download the files on first start (I'm doing such a mechanism in 3 of my app, that needs around 300 MB of resource for proper working)
You can read more techniques in Reducing the size of my App

How to reduce the itunes app size?

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 :)

Size limit of my ios app particularly Core Data

I have developed an app. It is an in-house app. I want to know if there is any limit on the size my app can take up on the iOS device. My app connects to a web-service and downloads data from SQL server. Maybe 1000s of rows. How much data can my app store on the iOS device? Can someone explain it in simple terms. I read its 2GB. But i think that is the size of the app when you install it.Correct? In archives section of organizer my app now says 1MB. So that 2gb, is the limit there correct?50 mb is the size of OTA download. I want to know how much space my app can occupy on the iOS Device. How much core data space can my app occupy? More questions to come. Thanks.
As far as I am aware you have can save as much data as you want on the device until it runs out of memory. Core Data store (eg sqlite file) just lives in a file in the documents directory of the device. Once there is no more room on the device, and there are no caches to clear I assume it will throw errors 'no space available' and such.
Write a quick little app that loads a large image from the bundle and saves it to the documents folder with a different filename (timestamp?), loop it until the device crashes and you might get to see how much memory it lets you have :)
(Do it on an actual device, not the Simulator)
2GB is the maximum size of the app that you are allowed to upload to iTunes and I don't think relates to how big your app can eventually become on the device.

Resources