What's the trick for copying a file to a simulator session?

Apple claims you can share files to the Xcode simulator.

The first step works (share-to-simulator context menu exists). But when you execute this nothing happens.

This contradicts the apple documentation which states:

a Simulator opens the Files app, and lets you select where to save the files.

If I instead try to drag and drop between the Mac and the simulator's file manger I receive the message:

Simulator device failed to open file:///Users/me/Downloads/Exchange/ExampleExport.json.

So what is the trick? Is there a missing authorisation that I need to set in the simulator's settings for example?


MacOS: 15.5 Xcode: 16.4 (16F6) ... the latest stable Apple versions.

Additional information.... Even if I use safari to download the file from google drive or icloud it fails with no message at all.

I suspect it's either an authorisation problem (can't determine how to authorize safari to access the simulation files) or a missing directory (i.e. simulator is trying to download to a non-existent directory).

All I can say is that Drag & Drop works for me. Depending on the file type, it opens the Photos or Files app, respectively. It does sound like there is something wrong with your installation.

I checked on a Mac mini . The share method worked there. Here’s hoping the next macOS update solves the problem for my MacBook.

What's the trick for copying a file to a simulator session?
 
 
Q