Adding photos to the iPhone simulator
Published 13 Mar 2012
I am currently developing an iOS app that will make use of the device camera. It works really well, but since I am also running this app on the simulator, I want to be able to select pictures from the photo library as well.
However, once I open up the UIImagePickerControllerSourceTypePhotoLibrary dialog in the iPhone simulator, I am presented with the following screen:
Uhm, can I? I have not found a way to do so, but there is an easy workaround for this so that you easily can add photos to your simulator.
Just open up Finder and drag any image you want to add into your simulator. When you see the green plus icon, just release the image. The image will then open up in Safari, like this:
Click the image and keep the mouse button pressed. You will now get an option to save the iamge to the simulator:
That’s it! If you open up the photo library, you will see the image in your list of saved images:
Hope it helps!