Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
add comment

1 Answer

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
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.