How to reduce App Download File Size?

How can I reduce the final app size when building with Phonegap Build ?

When building with Phonegap Build for Android all the other platform files, images, icons and splash screen files are also included in the Android .APK and vice versa for the other platforms.

I am now using the new method for generating the icons and splash screens. How can I remove the un-used files, icons, splash images etc?

I have tried .pgbomit but this does not have any effect when using the new way to generate the icons and splash screens.

How much bigger is it?

Are you always building for just iOS or Android?

(It may not be worth the trouble to make it smaller)

I build for iOS and Android but I need to keep the app download file size as small as possible (as per Android and iOS guidelines).

I have seen similar apps to mine where the app download size is more than half that of mine.

Apparently the app download file size affects the app store ranking and number of downloads.

Check your directories for stray/unused files. Minimize your js and html files. Make sure your images are correct.

The images created are the currently recommended set. Other apps, if smaller, probably do not have a complete set for all different screen sizes.

How much bigger is ti?

I opened the APK file in googles Android Studio and the ios icons and splash screens seem to double the size of my APK.

I also tried changing the .apk to .zip, deleted the ios icons and splash screens, changed the file back to .apk but it wont install due to no signing certificate (must be removed when unziping folders).

Is there anything I can add in the config file to stop NSBasic generating the icons and splash screens for platforms I dont need ?

Yet again, how much bigger is it?

Sorry, its adds almost 3mb.

assets/www/resources/ios = 2 MB
assets/www/resources/android = 655.55 KB
assets/www/resources/nsb/images = 79.6 KB

I always take a few minutes to convert all the generated png files to 8bit, dithered and they still look great. By default, they’re huge 32bit png’s. It reduces the size of my res contents from about 5mb to 2mb. For each app, I keep a master set of splash and icons per platform. Then…

When deploying to iOS, I leave the Android icons and image files there but melt them all down to 1k.
I do the opposite when deploying to Android. Takes a few minutes extra initially but it makes a big difference in the deployment file size.

Hope that helps.

Hi, thank you for your help.

Yes, I used to compress all my images as much as possible but now the new method that NSBasic V8 uses takes one master image (icon and splash) and auto generates all the other required sizes which I have no control over, it saves a lot of time but it bloats out the app file size.

I may have to revert back to the original method of manually adding my own compressed images and referencing them in the config file, this way I can and reference the actual platform icons and splash I’m building for.

With the average size of apps these days, I’m not sure that saving 1 meg in the size of the executable will be noticed by anyone.

OTOH, you’re now assured that all the different sizes which will be needed are included with your project - and that new ones will be added automatically when required. Your app will look good no matter what device comes along.

Well the idea is to let V8 auto-generate the images, or use to generate them. Then I run a batch command in Fireworks (or use Photoshop), to compress and re-export every image in the res folder to 8bit, dithered. The whole process takes less than a minute and I knock off 3 or more mb of data.

George is right, knocking off 1mb of data is not much these days, but 3mb or more does make a bit of a difference.

The iOS and Android resources add up to 2.665 megs. How big are they after compression? (certainly not 3 megs less!)

Here is a great example. Here is one of my apps res folders that I just finished back in December. Reduced from a whopping 11mb down to 5bm. That’s a BIG 6mb savings in file size there. Image sizes always depend on the number of colors in an image and the bit depth.

So, about half (theoretically - some images compress better than others). Still not much more than a meg.

Well the bottom line is I reduced this app size by 6mb. That’s a pretty good chunk of data.

Posted here after having replied to wrong thread: Since I stopped producing native iOS apps I always thought it could be nice to get rid of these iOS icons etc. Leaving solely the platform android in config.xml does not help. PhoneGap sets the iOS platform on Error. This issue is not really important for me. But one could think it over if every user downloading an Android apk should download an ios folder too with useless ca. 2,53 MB of png files for iOS.

I was surprised to discover that PhoneGap Build includes both platform’s assets in the executables it creates. However, I still believe that in today’s world, the extra size is not noticed by anyone. The latest data I can find on average app size is from 3 years ago, where the average iOS app was 38 megs. I’m sure it’s significantly larger now.

I might agree. My two cents worth about statistics: My AppStudio apps are between 4.1 and 7.x MB. Solely 1 is 14 MB, where the size comes from >100 mp3 files. I guess so small sizes of apps would not occur often.