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.
Related
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.
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.
One of our old project is now updated to XCode 7 and iOS9 SDK. Some of the images in the project is missing #3x versions and since we have a critical bug we need to submit it soon. We were testing our AdHoc build by
"Exporting one app for all compatible devices" - It is working fine.
What I want to know is, will App Slicing create problem if I dont have #3x images? Is there a way to turn it off?
Meanwhile I am trying hard to get all the 3x images
Okay, This is what happened,
I submitted the App without some of the 3x images.
App got approved.
Released in production, no issues so far related to images.
But one thing I noticed was that the slicing didnt happen. The Universal App size was 65MB and now also for every device it is showing 65MB in the AppStore, so i am confused whether the slicing happened or not.
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.
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 :)