Use an iOS device with Xcode

After connecting the iOS device over DevTunnel, the device can be accessed by XCode as if the device were connected directly to the development station.

For Xcode dependencies to operate or debug applications, see the Xcode release notes at https://developer.apple.com/documentation/xcode_release_notes/xcode_11_2_beta_2_release_notes#overview. Xcode 11.2 Beta 2 can work with iOS 13.2.

To connect the device using DevTunnel:

  1. Be sure to download the device iOS symbols by clicking the Download iOS Symbols button if it appears, as shown in the following dialog:

  2. When the DevTunnel session is established, activate XCode. The connected device will appear in the list of devices (in the Scheme pop-up list) available to run your XCode iOS project:

    Important: Verify that the XCode project and device are configured properly for working in XCode:
    1. In the project attributes panel, configure project signing to work with a development team, or a "Personal Team."
      You can use your Apple ID to generate a Personal Team.
    2. Select the device to add it to your Personal Team development account.

    3. Configure the device to trust your development team license (Settings > General > Profiles or Settings > Device Management).
    4. Verify that the project is configured with a Deployment target that covers the iOS version of the connected device.
  3. Select the device as your target and click Run button. XCode will build the project, install the application onto the device, and run the application (given the proper permissions) on the device.

Use the Web Inspector for Device Safari

After connecting the Perfecto Lab device over DevTunnel, you can use the Safari Web Inspector window to examine and debug web pages displayed on the mobile Safari on the connected device.

Important: iOS 13.x devices require a newer version of desktop Safari. Alternatively, you can use them with Safari Technology Preview. For more information and to download Safari Technology Preview, see https://developer.apple.com/safari/technology-preview/.

To connect the device using DevTunnel:

  1. Start the Safari browser on the device and navigate to the target web page.

  2. After the DevTunnel connection is established, start Safari on the development station.
  3. Find the connected device in the list of Develop targets.

  4. Click the web page URL. The Web Inspector page is displayed with the source code of the mobile Safari page:

  5. Use the Web Inspector to examine or debug the page, interacting with the device from the Perfecto Lab Interactive tab.

Install hybrid apps on a connected device

If you need to debug a hybrid iOS application (in DEBUG format), do not install the application with the "Install" widget (Perfecto Interactive widgets) because this will remove the debug information from the .ipa file. Instead, consider using Xcode to install the application on the connected device.

If you are not able to use Xcode to perform the installation (for example, it is not installed on your workstation), you have these options:

  • Use iTunes to install the application. This will take the complete .ipa file.
  • Use an open-source tool called ios-deploy, which installs the .ipa file without using Xcode.

    To install ios-deploy, follow the installation instructions in the Readme.md file.

    Connect the device in a DevTunnel session and execute the following command:

    Copy
    ios-deploy -b MyApplication.ipa

    The .ipa will be installed on your device with the proper debugging entitlements.