How to add Photos to the iPhone Simulator

Building an app that needs to access the photo library but don’t have any photos in the iPhone simulator? No problem. Follow these simple steps to import photos into the iPhone Simulator:

  1. Open the iPhone Simulator
  2. Browse to the photo you want to put into the simulator (Finder or web browser)
  3. Click and drag the photo over the simulator window. A green “plus” icon should appear under your cursor with the simulator frame highlighted. Drop the photo.
  4. Mobile Safari should open on the simulator to the location of the image you just dragged and dropped over it
    1. Note that if the image you dropped is linked in a webpage, it will open the link instead of the image URL.
  5. Click the mouse down over the image and hold it until a popup window appears.
  6. Click “Save Image”
The photo will now reside in the “Saved Photos” album on the iPhone Simulator. Rince and repeat as many times as you need to get all your photos in the album.
Hire Me

Have a problem you need help solving?
I'm available for freelance work. (and I love solving hard problems)

Trackbacks

Comments

  1. Vance,
    There is an exception to your instructions, in the case of an app I’m building using Titanium Studio. Due to some constraints, we aren’t allowing the app to get “backgrounded” which means if the app loses focus, the simulator closes. The method you describe will always try to background the app. So if I want to do this, I have to use the Xcode simulator which is not the same version as Titanium’s simulator. Thus, the images won’t appear in its Saved Photos.

    I found that you can add the photos manually to the simulator folder on the hard drive, but my problem is that I don’t know what version of the simulator Titanium uses. That is beyond the scope of what you were trying to convey. Just wanted to add a caveat to the discussion in case others encounter the same issue.

    Thanks.

All content copyright © 2013 Vance Lucas | Powered by WordPress | Entries (RSS) | Comments (RSS)