I have been trying for over an hour now. When I try to drag a file into the files app in the simulator from my Mac, it opens it in iMessage. Same thing happens when I share the file to the simulator from my Mac’s share sheet. Unfortunately, the file doesn’t even appear in iMessage either, it just.. opens iMessage.
I tried copying it into the active devices’ Downloads folder from the terminal using the “cp "file.mp3" ~/Library/Developer/CoreSimulator/Devices/[DEVICE_ID]/data/Downloads” command, but nothing happened. I ran ls on it, and it said the file was there, but it doesn’t show up in the simulator devices’ files app. My Xcode app is up to date according to the app store. My mac is on Sequoia 15.6.1. I’ve tried this on two different versions of iOS simulator, 18.3.1 and 26.2. I don’t really want to update Tahoe, lol.
Okay! I figured it out. Another case of spending forever fixing something, complaining about it, and then figuring it out 5 minutes later. I had to enable Supports opening documents in place, and Application supports iTunes file sharing. Then, I found this command:
open $(xcrun simctl get_app_container booted idk.MusicApp data)
Which then (should) open a window in Finder. Select the documents folder, then drag your file in there. The file should then appear in your app’s directory (which should now be visible) in the Files app on the iOS simulator.
Simulator is Apple tooling, if you have any more issues with Simulator or other Apple Tooling you should use the Apple Developer Forums. The Swift Forums are for Swift (Compiler) Specific Questions and Discussions.