Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Decrease iOS Application size to App Store

I am trying to submit an application in App Store, and I need to decrease its memory a little bit, if this is possible. I tried a method which I am gonna describe below to make my app lighter, but with not luck.

Details

I followed these steps to see what was causing this large size

  1. Make an archive of the project
  2. Distribute it
  3. Save for Enterprise or Ad-Hoc Deployment
  4. Select the .ipa file and changed the extension to .zip
  5. Extract it, and open Payload
  6. Show the Package Contents

Contents

I had .png files with 680 Kb (when I added those where 32 kb approximately), I deleted them and I reduced the size of application by 2 MB. There are other files that take space but not considerably, except one executable file that is taking about 90 % of the .ipa's size.

Question

Is it possible to decrease executable file's size? If not then can you give me a hint where I should look to make my app lighter in terms of size.

P.S I use third party libraries like Vuforia SDK and libraries on GitHUB

like image 824
E-Riddie Avatar asked May 29 '14 16:05

E-Riddie


People also ask

How can you reduce your app size iOS?

Consider using asset files instead, and put them in an asset catalog. Moving data and assets out of your source code and into asset files significantly reduces the size of your app's binary. It also allows App Store Connect to more efficiently compress your app.

Why iOS apps are so big in size?

"Apps are getting bigger because iOS devices are more powerful, and developers are building more and more complex things for them without considering the impact the size will have around the world," developer Stephen Troughton-Smith tells Gadgets 360.


3 Answers

How can I reduce the size of this executable file

You cannot reduce the size of the executable inside your built app bundle. This is your code! The only ways to reduce its size are:

  • Cut code. Obviously you can't do that because you would exclude functionality that makes your app work.

  • Remove an architecture slice. You should not do that because you want to build for all possible architectures.

Having said that... I have never generated an executable inside the app bundle anywhere near this large. Maybe you are measuring / building wrong:

  • Make sure you are archiving. Nothing else except an archive is worth measuring.

  • Make sure that you are generating a Release build when you Archive.

  • Make sure that your Release build settings include the full compiler optimization (smallest, fastest).

like image 99
matt Avatar answered Oct 20 '22 05:10

matt


Suggestion how to reduce binary size from Reducing the size of my App:

Compiler Options

Setting the Optimization Level build setting to Fastest, Smallest [-Os]; and the Strip Debug Symbols During Copy build setting to Yes (COPY_PHASE_STRIP = YES) can dramatically lower the size of your compiled binary. These settings are the default for the "Release" configuration in Xcode projects.

like image 30
Avt Avatar answered Oct 20 '22 03:10

Avt


Assets are almost always the main culprit of large apps sizes.

If you archive your app and export the IPA you will be able to convert it so a .zip by changing the extension and then unzip and look at the contents of the package.

If you sort by file size you will see which files are the largest. Keep in mind images with transparency are larger.

Some more insight as well: http://bjango.com/articles/pngcompression/

like image 1
runmad Avatar answered Oct 20 '22 05:10

runmad