Adding photos to the iPhone simulator
I am currently developing an iPhone app that will make use of the camera. Since I am also testing it in the simulator, I want to be able to select pictures from the photo library as well, if the camera is missing.
However, once I open up the UIImagePickerControllerSourceTypePhotoLibrary in the iPhone simulator, I am presented with the following screen:
Uhm, can I (sync photos and videos to the simulator using iTunes)? I have not found a way, but there is an easy way to work around this and fill your iPhone with photos.
Just open up Finder and drag any image you want to add to your simulator. When you see the green plus icon, just release the image and it will open up in Safari, like this:
Now, click the image and keep the mouse button pressed, and you will get the option to save it 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!