Simulator fails to import data - Xcode 11.2.1 on Catalina 10.15.1

So if I drag and drop a simple jpg photo which normally would appear in the Photos App I get the following error:


One or more media items failed to import:

/Users/dev/Desktop/images/Fotolia_8598911.jpg: The operation couldn’t be completed. (PHPhotosErrorDomain error -1.)



If go to a file via Finder on my OS X Desktop, select the file, do a right click Share->Simulator.

Then in the Share Sheet pick my running simulator for iPhone or iPad the photo NEVER shows up anywhere.


Anyone else have this issue?


I'm trying to figure out how to update screen shots to push a new app update to the store. Ugh....



Cheers

Post not yet marked as solved Up vote post of sincerus Down vote post of sincerus
8.6k views

Replies

Same issue here. Super annoying.

I have the same problem too.


It seems that on Catalina it is no longer possible to transfer files from the Finder to the simulator.


For me it's a big problem because I often have to send documents to the simulator to test the open procedure of some of my apps.


Before Catalina when you dragged a file on the simulator the respective app was opened, the file was copied to the Inbox folder and the UIApplicationDelegate method application(_:open:options:) was called.


Unfortunately on Catalina the file is no longer copied to the Inbox folder and therefore the url parameter of the application(_:open:options:) method is pointing to a non existing file.


It must be a bug because also Apple apps react badly (for example Photos as reported by sincerus).


I hope the problem will be fixed soon.


In the meantime, does anyone know another way to send files from the Finder to the simulator?

I just ran into this problem and after a bit of experimentation, I was able to get the file to import properly by moving it to a different directory before dragging it into the simulator. In my case, I was trying to drag and drop it into the simulator from my ~/Downloads directory and that wasn't working, but when I moved it to ~/ and then dragged it into the simulator, it worked fine.

  • Thank you for your nice info! The problem was solved.

  • Thanks

  • Thank you! I sent it to my pen drive and moved to the simulator from there. It worked as well. Maybe is a file permission thing.

You are right derekst991!


I have the issue if I drag a file located on the desktop but it works correctly if the file is located inside the documents folder.


Thank you!

This worked for me. I just got this "Catalina" Permission Alert, to allow the Simulator access to my Documents folder. So I guess that's where the Problem is? I think I never got asked about Desktop/Downloads, so maybe Catalina just prevents the Simulator from accessing those locations.

When I tried this with a simulator running iOS 15.0, I could not drag from my Downloads folder onto the Simulator Files app. That failed with "you don't have permission" When I moved the file to my Documents folder, I was able to drag it into the Files app.

I found that I could only drag images into the Simulator from the "Photos" app on my Mac.