I have photos on my Mac that I would like to add to the iPhone Simulator to test my application.
In other words: how do I add photos to the iPhone Simulator?
Edit : What about iphone Simulator 4.0 ? iphone Simulator 3.0 & 4.0 both working differently.
Thanks in advance for helping me...
iOS Simulator in XcodeApple's homegrown Xcode software development environment for Mac comes with its own app simulator for iOS, tvOS, watchOS, and iMessage.
type: ~/Library/Application Support/iPhone Simulator. The Directories are the iOS version of the different Simulators. The Sub Directories are the Apps install on the simulator. The Documents folder is where the user generated content which gets backup up onto iCloud.
Open the Window in mac where your images are stored.
Open your simulator another side.
Now drag your image from mac window to simulator,
simulator will open safari, and in a safari tab your image will be shown.
Tap & press down on image in simulator,
There will be message to "save image",
save image.
It will be added to your iPhone simulator.
Edit :
First just look at following image.
In iPhone simulator 4.0 ( iphone/iphone simulator ), itself it maintains a sqlite database for added images. So, if you want copy paste system - first make insert entries & then copy paste. That would be ridiculous way.
Ok. Let me explain simpler way of doing it.
A more easy to understand version of sagar's answer:
Open a Finder window to where your images are stored and the iPhone Simulator. Then drag the images from the Finder window into the simulator. The simulator will open Safari with your image. Click and hold to save the image to the iPhone camera roll. You can now use those images as you normally would.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With