Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm testing an iPhone application and need to test its behaviour when storage space is low or the disk is full. This is fiddly to test on a device and ideally I'd like to be able to test with the simulator (an emulator) which runs on my Mac.

The simulator uses a directory on the local filesystem for storage, therefore I would think it possible to create a virtual disk somehow, and then symlink the storage directory to this disk.

How can I create such a virtual disk?

share|improve this question
up vote 4 down vote accepted

You can use the Disk Utility (from Finder: Applications -> Utilities -> Disk Utility) program to create a new Disk Image (a .dmg file), the size of your choosing, that you can mount (by double click on the .dmg file). Once mounted it shows up just like any other external disk on your Mac. You can point the emulator to this disk and tell it to store its "filesystem folder" on it.

Here are Apple's instructions for creating a disk image using Disk Utility.

share|improve this answer
Thanks, it turned out to be really easy! – David Caunt Dec 7 '10 at 16:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .