I am trying to use UIImagePickerController
with UIImagePickerControllerSourceTypePhotoLibrary
, but it says, "No photos". Where does the simulator get the images from? Where should I copy the images so that they are displayed in the simulator?
相关问题
- CALayer - backgroundColor flipped?
- Core Data lightweight migration crashes after App
- How can I implement password recovery in an iPhone
- how do you prevent page scroll in textarea on mobi
- Custom UITableview cell accessibility not working
相关文章
- Could I create “Call” button in HTML 5 IPhone appl
- Unable to process app at this time due to a genera
- How do you detect key up / key down events from a
- “Storyboard.storyboard” could not be opened
- Open iOS 11 Files app via URL Scheme or some other
- Can keyboard of type UIKeyboardTypeNamePhonePad be
- Can not export audiofiles via “open in:” from Voic
- XCode 4.5 giving me “SenTestingKit/SenTestKit.h” f
If you need to import more than just one or two photos then take a look at this article that I wrote. It describes an easy way to perform a bulk import of photos and works for iOS 4.x.
Since Xcode 6 you can use the command line tool
xcrun simctl
.Usage is very simple; to add a photo to the currently running simulator you use the
booted
placeholder.To add it to any other simulator, you use its device id, which can be found by running
xcrun simctl list
.Its simple. Just follow these steps :
This displays actionSheet with Save, Cancel option (Also copy in case of iOS 7 simulator).
Save the image. The image gets added into Library.
Adding an image to the Iphone Simulation running IOS 8.0 is even easier.
No need to deal with Safari anymore
For iOS 8.0,the answer is out of date.I found the media resource in the following path: ~/Library/Developer/CoreSimulator/Devices/[DeviceID]/data/Media/DCIM/100APPLE
I wrote a bash script to do this. Check the link[1]
[1] : https://gist.github.com/firesofmay/5194901