Wednesday, July 3, 2013

Exploring App Space Usage

Currently we're working on a new PDF application (top secret).
One of the issues we ran into was the large amount of space the app uses.

Of course, loads of PDF's use loads of space. Still it was very improbable that the files I had imported to 830 MB!

The size of our App's Documents & Data ran over 830 MB!!!
(find this info in: iPad -> Settings -> General -> Usage -> App Name)

I needed to know what was eating this space, but had no idea how.
Then, this morning while debugging I mis-clicked something in XCode, and suddenly found what I was looking for.

How to explore your App Space Usage

  1. Connect your iPad / iPhone to your development machine
  2. Open XCode
  3. Open the Organizer (in XCode: Window -> Organizer)
  4. Go to Devices (top menu)
  5. Go to your iPad / iPhone (left menu)
  6. Go to Applications
  7. Now you'll see a list of all the apps you've developed and their data files (see image)
  8. By clicking the Download button in the bottom, you can download all the files in the App.



Problem Found

After downloading all the files, I quickly found the problem. All the PDF's were being cached and the cache had become more than 500 MB.

Solution: purge the cache on every App restart.
Simple solution, bye bye problematic space usage ;)

Do you have any suggestions or comments?
Don't hesitate to leave them!

Success & Keep Koding!
Freek Sanders.
MakeMeBlue

No comments:

Post a Comment