Category Archives: Apple/OS X

Simulating Low Disk Space in iPhone Simulator

While testing my iPhone application, I realized there is no way to test out my worst-case scenario, when there is no disk space. How do we do that? This StackOverflow post lays it out conceptually:

I bet you could also create your own .dmg file with file system of size … say 2Mb and write to it. If this works, then it is super-easy for testing – you just mount it and switch the path for testing. If the dmg is small enough, you could probably even upload it to the source control.

Let’s do this “in practice”.

Continue reading