03 - Libimobiledevice connection - Mac - iOS
update 28 NOV 2024
At the moment, it is not possible to run a test with iOS >= 17
Activate developer mode
An access to iOS developer options is needed:
Go to Settings > Privacy & Security > Developer Mode
Turn on the toggle button and select "Restart"
When the iPhone restarts, there is a popup "Turn on Developer Mode?". Accept it.
Go to Settings > Developer and toggle "Enable UI Automation"
If you can't see the developer mode option from Settings, connect the iPhone to a Mac via USB with Xcode. This will make it appear.
Connect device via USB
Connect the iPhone to a computer via an USB cable
The first time you connect an iPhone through USB, a popup
Trust This Computer?
should appear. Click onTrust
:
Run the following command to verify that the libimobiledevice library detects the iPhone:
idevice_id
The UDID of the device should appears.
IPA installation
To use the IPA with your device, we have to allow the UDID of your device. You can find it with the idevice_id
command. Please send us this identifier.
To run a local test on an iOS device, you need to install the Greenspector ios-testing-tools IPA.
Please follow the steps below:
Install the ideviceinstaller package with the following command:
brew install ideviceinstaller
Download the IPA by accessing the following URL: http://dl.greenspector.com/ios-testing-tools/ios-testing-toolsUITests.ipa
Install the IPA on the device with the following command:
ideviceinstaller --install [path_to_ipa]
Replace path_to_ipa by the path of the ios-testing-tools IPA you just downloaded.
Mount a developer disk image
You also need to mount a developer disk image.
You can find the image related to the version of your device at one of the following locations:
On your Mac: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport
On internet for iOS < 16.7: Releases · mspvirajpatel/Xcode_Developer_Disk_Images
On internet for iOS 16.7: DeveloperDiskImage/DeveloperDiskImages/16.7 at main · doronz88/DeveloperDiskImage
Run the following command:
Replace path_to_developer_disk_image by the path of your image.