03 - Libimobiledevice connection - Linux - iOS
update 29 aug 2024
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 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:
sudo apt-get 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 the following location: https://github.com/mspvirajpatel/Xcode_Developer_Disk_Images/releases
Run the following command:
Replace path_to_developer_disk_image by the path of your image.
If the ideviceimagemounter command returns an error, you may have to restart your device.
Â