You, as an iPhone user, must be struggling to think about why the iOS app size is greater than the apps on Android platform and others. Normally the videos and pics are the culprits behind the shortage of space for storing on iPhones, right? Well, that is not always the case. The reason is a whole lot different than you think.
The main reason behind the wastage of iPhone memory, apart from music, photos, and videos is cache. Any iOS application assembles tons of caches, specifically if they are not clearing cache. It should be taken care of during the time of the iPhone app development.
Times Changed but Not the Storage Problems
Gone are the times when 16 GB iPhones were used by the people. Apple stopped the manufacturing of it and today these 16GB iPhones are rare to be seen getting used .
Lately the minimum storage on a replacement iPhone is 64 GB. Still, it’s believed to be half but what it should provide. As a result, users may need to restrict themselves from taking videos and keeping pictures within the iPhone storage alternatively will need to compromise deleting a number of the brilliant games occupying an honest amount of space.
The worst-case would be to travel through all the documents within the file storage and delete them. It’s a cruel but true incontrovertible fact that iPhone users need to delete apps so as to form space within the memory storage of the respective device.
In this article, we’ll see various aspects of the app size of the iOS apps and techniques of iOS app optimization before they are launched.
Why does iOS App Size need to be Optimized?
A few reasons are understood from the user experience perspective.
Limited & Expensive Internet Data Packages
Not all users have the pliability of knowledge packages or broadband or wifi. There are still the bulk of the users who are downloading the iOS applications from the Apple App Store over cellular connections. Updating the apps remains an equivalent thing and hence the dimensions of the apps becomes even more important considering the limitation of using internet data on day to day.
For Enhanced User Retention
There are maximum chances of a rise in user retention if the app sizes in iOS are optimized. Hence, any stakeholders of a fresh iOS app development project must consider the app size so as to extend user retention down the road .
Ignorance to App Size isn’t a Bliss
No matter how great your app might be from features and graphics point of view. The primary experience of any app starts with the downloading process. A lengthy and never-ending spell of ‘time to first play’ could let down many users even before they experience your mobile app. Many users may have already got a particularly bit of disc space the instant they explore your app and check out downloading it.
AppStore limit for apps
- From iOS 13, an alert pops up while downloading an app of quite 200 MB in cellular connection. This notification alert is often customized to “Always Allow” or “Always Warn” when downloading in cellular connection.
- For iOS devices running with an OS version less than iOS 12, it’s mandatory for the apple device users to be connected with WiFi to download apps of quite 200 MB.
- The maximum size an iOS app is often submitted in the AppStore is 4 GB.
Each Mach-O executable file (Exp.: app_name.app/app_name) must not exceed the subsequent limits:
- For apps whose MinimumOSVersion is a smaller amount than 7.0: maximum of 80 MB for the entire of all __TEXT sections within the binary.
- For apps whose MinimumOSVersion is 7.x through 8.x: maximum of 60 MB per slice for the __TEXT section of every architecture slice within the binary.
- For apps whose MinimumOSVersion is 9.0 or greater: maximum of 500 MB for the entire of all __TEXT sections within the binary.
All this data above is depicted on Apple Support.
Techniques to scale back App Size in iOS Development
As a result, it becomes vital for iOS application developers to think about building and launching lightweight apps. App thinning is the technique employed by the iOS dev community. There are three main ways in App Thinning. they’re explained below:
In the early and mid-way launch of varied iOS versions (before iOS 9 was launched), Apple used universal binary within the app bundle to be downloaded on all the iOS devices. As a result, the assets that aren’t needed on a selected device were downloaded vainly , which racks up significant storage.
App slicing is taken into account to be the foremost convenient way in slicing the app bundles to avoid this scene. The iOS app developers can upload one IPA (iOS App Store Package) to the app store connect. The Apple team will slice the entire pack into various segments of IPAs.
This is supported by the executable architecture and various resources needed on different devices. The iOS development team must put and add all the pictures to “Assets.xcassets” without fail. it’s an asset catalog that’s generated in Xcode. it’ll help the Apple team to spot images for specific devices.
Because of this, all the iPhone devices will download the designated images while downloading the app, which will increase the downloading speed, reduce the app size, and save less storage on the iPhone.
An intermediate representation of a compiled program in iOS app development is named Bitcode. it’s quite a bridge between iTunes and therefore the Apple Store. An iOS app that’s uploaded on iTunes Connect with a bitcode is going to be compiled and linked to the App Store. Using the bitcode, Apple itself recompiles apps using the newest version of the compiler.
This eliminates the need to submit or upload a new version of the app in the store. Instead, the bitcode will help the iPhone app to directly get linked to the store. The embedded bitcode enables the system to recompile existing applications and make them compatible with the new device chipset. The iOS app developers can optimize or re-optimize the iOS app code without the need to submit a new app version every time.
There is no internal dependency afterwards between the App slicing and bitcode. App slicing still resumes even if bitcode is not enabled.
These resources are separated from the related app bundle that users download from the App store.
The purpose of on-demand resources is that any or many of them can float directly to the user app as soon as their need is triggered. There is no point in having them all at once without any specific need to be used. The on-demand resources can be hosted by TestFlight. Testflight is an over-the-air installation service platform in iOS app development, on web servers.
The app developers need to assign a tag to the resource modules during app development. So whenever there is a need for an on-demand resource, the respective resources can be identified and utilized. This significantly helps to free up the storage space and bring down the iOS app size.
Am I missing anything? Feel free to share if you want to add up something more. We’ll be pleased.