I have used 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?
I have used 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?
Now you can do this easily just by dragging
and dropping
the images in to Photos app in iPhone Simulator
.
If someone gets an error similar to
One or more media items failed to import:
/Users/Username/Desktop/Screenshots/Screen Shot 2021-07-09 at 12.05.29.png: The operation couldn’t be completed. (Cocoa error -1.)
You can try to move the picture to the user's root folder. In my case /Users/Username/Screen Shot 2021-07-09 at 12.05.29.png
, and I was able to drag and drop my image from Finder to the simulator.
You can drag files like images or video from your local mac machine to simulator once you open the photos or video list of the iphone.
But make sure you're uploading from Documents folder else it won't get uploaded if you drag files from other folders.