Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

phonegap IOS application size

Tags:

xcode

ios

cordova

I created phonegap app for both android and IOS using eclips and xcode4.5

The size of Andorid app is 650KB

The size of IOS app is 9MB!!!

I created empty phonegap app (just did create on terminal) and got the same size

How can I reduce the IOS application size ?

Thanks!

like image 540
Sharon Mantin Avatar asked Dec 04 '12 06:12

Sharon Mantin


1 Answers

The standard iOS App includes lots of Artwork, e.g. for the CDVCapture plugin. If you don't use the Capture API (which is likely), you could save 2.3MB by deleting the Capture.bundle in the Resources folder and removing CDVCapture from the Plugins list in the Cordova.plist.

Capture.bundlerm CDVCapture from plugins

Of course much of the filesize is caused by the various splash screens, icons and maybe artwork you use yourself. There is a very good way to minimize the cost of these. Get ImageOptim and drop your Xcode project folder on it. This will reduce the filesize of your images dramatically (without losing quality). One last step: Xcode recompresses all of the artwork, so they have a bigger filesize again (stupid, right?). Go to the Build Settings tab and type PNG into the search field. Set Compress PNG files to NO. Compress PNG files

further reading on imageoptim & Xcode

The whole process should reduce your App by at least 50%, please report back how much you could achieve, thanks.

like image 195
Stephan Bönnemann-Walenta Avatar answered Oct 05 '22 22:10

Stephan Bönnemann-Walenta