Skip to main content
Pushes a file from the host onto the device at a target location. There is no simplified form. path and location are required.

Parameters

Location

location is interpreted differently on each platform.

Android

location is an absolute file path on the device. Put media under a media-scanned directory (e.g. /sdcard/Pictures, /sdcard/Download) so it shows up in the gallery.

iOS

location is either a bare filename or an app-container path:
  • Photos: a plain filename with no parent directories (keep the real image or video extension). The file is imported into the iOS Photos library, i.e. the camera roll the system photo picker reads from. Only images and videos are supported here.
  • App container: the @<bundle-id>:data/<path-inside-container> form writes the file into the app’s private data container. Use this for non-media files (e.g. PDFs) and anything the app reads from its own storage. <bundle-id> must be an app installed on the device (the one you openApp). iOS files generally belong under Documents/ (e.g. @<bundle-id>:data/Documents/file.pdf). iOS only exposes the app’s Documents/ directory to the Files app and most apps only read user files from there, so a file written to the container root (e.g. @<bundle-id>:data/file.pdf) usually won’t show up in the app. Use another subdirectory only if the app you’re testing reads from a different location.