Appium has been used libimobiledevice seriese, ios-deploy and ifuse to communicate with Apple devices. The CLI is very useful, but we’re switching it with appium-ios-device from next release, Appium 1.15.0.
macOS has usbmuxd in /System/Library/PrivateFrameworks/MobileDevice.framework/Versions/A/Resources/usbmuxd to communicate with Apple devices. It is launched by /System/Library/LaunchDaemons/ com.apple.usbmuxd.plist.
As a readme on appium-ios-device, the library communicates with devices over usbmuxd directly. The npm module can find connected devices, find packages installed on the devices, upload files, etc. We can reduce dependencies outside Appium.
As help of the ios-deploy, it has many features.
Usage: ios-deploy [OPTION]...
-d, --debug launch the app in lldb after installation
-i, --id <device_id> the id of the device to connect to
-c, --detect only detect if the device is connected
-b, --bundle <bundle.app> the path to the app bundle to be installed
-a, --args <args> command line arguments to pass to the app when launching it
-t, --timeout <timeout> number of seconds to wait for a device to be connected
-u, --unbuffered don't buffer stdout
-n, --nostart do not start the app when debugging
-N, --nolldb start debugserver only. do not run lldb
-I, --noninteractive start in non interactive mode (quit when app crashes or exits)
-L, --justlaunch just launch the app and exit lldb
-v, --verbose enable verbose output
-m, --noinstall directly start debugging without app install (-d not required)
-p, --port <number> port used for device, default: dynamic
-r, --uninstall uninstall the app before install (do not use with -m; app cache and data are cleared)
-9, --uninstall_only uninstall the app ONLY. Use only with -1 <bundle_id>
-1, --bundle_id <bundle id> specify bundle id for list and upload
-l, --list list files
-o, --upload <file> upload file
-w, --download download app tree
-2, --to <target pathname> use together with up/download file/tree. specify target
-D, --mkdir <dir> make directory on device
-R, --rm <path> remove file or directory on device (directories must be empty)
-V, --version print the executable version
-e, --exists check if the app with given bundle_id is installed or not
-B, --list_bundle_id list bundle_id
-W, --no-wifi ignore wifi devices
--detect_deadlocks <sec> start printing backtraces for all threads periodically after specific amount of seconds
The usbmuxd has no well documented resources, so I would like to put some links here.