Add images and photo to iOS Simulator

iOS Simulator: come aggiungere immagini e foto

When developing an iOS app you might need to have a few more images or photo in the iOS Simulator device. Unfortunately the process isn't as straightforward as you would expect it to be because the Simulator - unlikely Android emulators - doesn't have any access to your local Mac HDD Drive. Let's see how we can achieve such result.

XCode 6 and beyond

If you're dealing with XCode 6 and above the process is quite easy: all you need to do is to launch the Photo app which is included in the default bundle shipped with the Simulator:

 

iphone.simulator.photo.app

 

Once you do that, just drag & drop from a Finder window the images you want to add:

 

iphone.simulator.photo.app.copy

 

 

XCode 5.x and below

If you're still locked to an earlier XCode version, you can't drag & drop directly to your Photo app. You need to bridge your struff through Safari instead, following the instruction below:

  1. Drag & drop your image (one at a time) from the Finder window to the iOS Simulator window.
  2. Wait for Safari to launch: the Simulator should do that automatically. If it doesn't, just launch Safari and start over from step 1.
  3. Do a long tap on the image opened in Safari to save it inside your Simulator default camera roll.

 

Image courtesy of http://stackoverflow.com/a/18743182/1233379
Image courtesy of http://stackoverflow.com/a/18743182/1233379

 

Notice that your image will be put in the following folder of your Mac's HDD:

You won't be able to drag & drop there tho: the image won't be added to the Simulator Database that way, so it won't appear on your emulated device. If you want to use it from your Simulator you have to stick to the above method.

A special thanks to Besi and to his answer on stackoverflow.com web site!

 

About Ryan

IT Project Manager, Web Interface Architect and Lead Developer for many high-traffic web sites & services hosted in Italy and Europe. Since 2010 it's also a lead designer for many App and games for Android, iOS and Windows Phone mobile devices for a number of italian companies. Microsoft MVP for Development Technologies since 2018.

View all posts by Ryan

One Comment on “Add images and photo to iOS Simulator”

Leave a Reply

Your email address will not be published. Required fields are marked *


The reCAPTCHA verification period has expired. Please reload the page.

This site uses Akismet to reduce spam. Learn how your comment data is processed.