Testing on a real iOS device
App testing on the iOS Simulator is quick and easy, but sometimes it is required to run a test using a real device connected to the machine running the iOS test. To run iOS tests on a real device, several requirements need to be fulfilled:
- The system has to be prepared as described in section 17.2, including a complete installation of Xcode.
- The Developer Mode must be enabled on the device in »Xcode«-»Settings«-»Privacy & Security«.
- The device has to be connected to the machine, and the machine has to be marked as "trusted" on the device.
- The device must be unlocked during testing.
- A developer account must be added in »Xcode«-»Settings…«-»Accounts« using its Apple ID.
- The team ID corresponding to the selected developer account must be provided using the option Code Signing Team ID / Organizational Unit.
- Sometimes, the first test start fails due to missing profile trust on the device. To trust the developer profile, open the Settings app and on the device navigate to »General«-»VPN & Device Management« or »Profiles« and confirm the trust there.
- Applications, which are installed on the device during the test must be available in a version build for "Any iOS device" (which is another build target than "Any iOS Simulator"), and properly signed. As well, a provisioning profile must be installed on the device allowing the application to be run (see Apple documentation).
