Post

Replies

Boosts

Views

Activity

Reply to How to copy a file to a simulator in Device Hub?
Ok, I have an incredibly hacky way to do it, all from the terminal. Use something like this to work out the ID of the simulator you want to copy a file into: xcrun simctl list | grep Booted Now work out the Files app group container with: xcrun simctl get_app_container <simulator ID> com.apple.DocumentsApp groups Make a note of the path for group.com.apple.FileProvider.LocalStorage. Finally, use rsync to copy the file to the local storage location (cp doesn't work for some reason 🤷‍♂️): rsync /path/to/my/file.dat "<LocalStorage path>/File Provider Storage/myfile.dat" If you use cp or Finder, the copy fails and leaves a zero byte file. If you're just copying text, you can actually then open that file and just paste the text in.
Sep ’26
Reply to How to copy a file to a simulator in Device Hub?
Sorry, I should have been clearer. I don't want to add a media file or vCard, it's just an essentially arbitrary data file (in reality it's a backup of data - it's useful to populate the app I'm testing with data). Syncing with iCloud isn't really an option because I think I'd have to sign both my mac and the simulator into a test apple ID? I kinda need my real Apple ID on my mac :)
Sep ’26
Reply to How to copy a file to a simulator in Device Hub?
Ok, I have an incredibly hacky way to do it, all from the terminal. Use something like this to work out the ID of the simulator you want to copy a file into: xcrun simctl list | grep Booted Now work out the Files app group container with: xcrun simctl get_app_container <simulator ID> com.apple.DocumentsApp groups Make a note of the path for group.com.apple.FileProvider.LocalStorage. Finally, use rsync to copy the file to the local storage location (cp doesn't work for some reason 🤷‍♂️): rsync /path/to/my/file.dat "<LocalStorage path>/File Provider Storage/myfile.dat" If you use cp or Finder, the copy fails and leaves a zero byte file. If you're just copying text, you can actually then open that file and just paste the text in.
Replies
Boosts
Views
Activity
Sep ’26
Reply to How to copy a file to a simulator in Device Hub?
Sorry, I should have been clearer. I don't want to add a media file or vCard, it's just an essentially arbitrary data file (in reality it's a backup of data - it's useful to populate the app I'm testing with data). Syncing with iCloud isn't really an option because I think I'd have to sign both my mac and the simulator into a test apple ID? I kinda need my real Apple ID on my mac :)
Replies
Boosts
Views
Activity
Sep ’26