Cordova 3.0 www/res extra images remove

When building a Cordova 3.0 project lots of extra images get added in.

As of now I have no idea how to exclude them in the normal build process: cordova build ios etc.

They are from the www/res/icons and www/res/splash folders

Here are the steps I take to remove them:

For Android I just run this command after a build:

zip -d projectname-release-unsigned.apk assets/www/res/*

For IOS XCode5:

Click on Build Target -> Build Phases -> Copy www directoy

Then add in (at line 18):

if [ -d "www/res" ]; then
  rm -R www/res

This allows my build to remain small, as it cuts out about 7meg!

Leave a Reply

Your email address will not be published. Required fields are marked *