Over 16,513,612 people are on fubar.
What are you waiting for?

How to Shrink Your App

How to Shrink Your Mobile App

With the recent release of the new iPad, app resources (images, videos, etc.) will be significantly larger. Apple has raised the 3G app download to 50mb to compensate for the larger images, but it may still be a tight squeeze. This is especially true for universal mobile apps that have to support low and high resolutions of iPhones, iPods, and now the iPads. Often during the construction of an app we will go through many revisions to the UI, moving new assets in and out of the app. In this confusion, there’s a chance that the ipad application developer might forget to remove the image as a resource from the project when it is no longer used.

We have written a script to automate the process of finding unused resources:

https://github.com/xtremelabs/ResourceImagesUsed

It’s simple to use, just clone the repo and invoke the script providing a relative path to the project’s working directory. For example:

1
./images_used.rb workspace/AngryBirds

The script can optionally include or exclude comments, and can be configured to provide a varying amount of output to the console. It recursively searches the provided project directory; looking at various files such as headers, implementation files, and nibs. It’s easy to edit the script to include resources of any given file extension.

There are some known issues, for example, stringWithFormat:@"%@.png" won’t work. Feel free to fork and please report bugs.

Leave a comment!
html comments NOT enabled!
NOTE: If you post content that is offensive, adult, or NSFW (Not Safe For Work), your account will be deleted.[?]

giphy icon
blog.php' rendered in 0.0601 seconds on machine '194'.