AWS Device Farm
Developer Guide (API Version 2015-06-23)

Skipping App Re-Signing on Private Devices in AWS Device Farm

When you use private devices, you can skip the step where AWS Device Farm re-signs your app. This is different from public devices, where Device Farm always re-signs your app on the Android and iOS platforms.

You can skip app re-signing when you create a remote access session or a test run. This can be helpful if your app has functionality that breaks when Device Farm re-signs your app. For example, push notifications might not work after re-signing. For more information about the changes that Device Farm makes when it tests your app, see AWS Device Farm FAQs.

To skip app re-signing for a test run, select Skip app re-signing on the Configure page when you create the test run.


            Select Skip app re-signing when using private device instances on a test run

Note

If you're using the XCTest framework, the Skip app re-signing option is not available. For more information, see Working with XCTest for iOS and AWS Device Farm.

Additional steps for configuring your app-signing settings vary, depending on whether you're using private Android or iOS devices.

Skipping App Re-Signing on Android Devices

If you're testing your app on a private Android device, select Skip app re-signing when you create your test run or your remote access session. No other configuration is required.

Skipping App Re-Signing on iOS Devices

Apple requires you to sign an app for testing before you load it onto a device. For iOS devices, you have two options for signing your app.

  • If you're using an in-house (Enterprise) developer profile, you can skip to the next section, Creating a Remote Access Session to Trust Your iOS App.

  • If you're using an ad hoc iOS app development profile, you must first register the device with your Apple developer account, and then update your provisioning profile to include the private device. You must then re-sign your app with the provisioning profile that you updated. You can then run your re-signed app in Device Farm.

To register a device with an ad hoc iOS app development provisioning profile

  1. Sign in to your Apple developer account.

  2. Navigate to the Certificates, IDs, and Profiles section of the console.

  3. Go to Devices.

  4. Register the device in your Apple developer account. To get the name and UDID of the device, open the Device Farm console and navigate to the Device instances tab of the Project settings page or use the ListDeviceInstances operation of the Device Farm API.

  5. Go to your provisioning profile and choose Edit.

  6. Choose the device from the list.

  7. In Xcode, fetch your updated provisioning profile, and then re-sign the app.

No other configuration is required. You can now create a remote access session or a test run and select Skip app re-signing.

Creating a Remote Access Session to Trust Your iOS App

If you're using an in-house (Enterprise) developer provisioning profile, you must perform a one-time procedure to trust the in-house app developer certificate on each of your private devices.

To do so, you can either install the app that you want to test on the private device, or you can install a dummy app that's signed with the same certificate as the app that you want to test. There is an advantage to installing a dummy app that's signed with the same certificate. After you trust the configuration profile or enterprise app developer, all apps from that developer are trusted on the private device until you delete them. Therefore, when you upload a new version of the app that you want to test, you won't have to trust the app developer again. This is particularly useful if you run test automations and you don't want to create a remote access session each time you test your app.

Before you start your remote access session, follow the steps in Creating an Instance Profile to create or modify an instance profile in Device Farm. In the instance profile, add the bundle ID of the test app or dummy app to the Exclude Packages from Cleanup setting. Then, attach the instance profile to the private device instance to ensure that Device Farm doesn't remove this app from the device before it starts a new test run. This ensures that your developer certificate remains trusted.

You can upload the dummy app to the device by using a remote access session, which allows you to launch the app and trust the developer.

  1. Follow the instructions in Create a Session to create a remote access session that uses the private device instance profile that you created. When you create your session, be sure to select Skip app re-signing.

    
                        Skip app re-signing when creating a remote access session

    Important

    To filter the list of devices to include only private devices, select Private device instances only to ensure that you use a private device with the correct instance profile.

    Be sure to also add the dummy app or the app that you want to test to the Exclude Packages from Cleanup setting for the instance profile that's attached to this instance.

  2. When your remote session starts, choose Upload to install an application that uses your in-house provisioning profile.

  3. Launch the app that you just uploaded.

  4. Follow the instructions to trust the developer certificate.

All apps from this configuration profile or enterprise app developer are now trusted on this private device until you delete them.