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

Skip App Re-signing on Private Devices in AWS Device Farm

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

You can skip app re-signing when you create a remote access session or when you create a test run (part of the Configure step). When you create a test run, select Skip app re-signing.


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

You might want to skip app re-signing 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 modifications Device Farm makes when it tests your app, see AWS Device Farm FAQs.

Note

If you're using the XCTest framework, the Skip app re-signing option is not available. For more information, see XCTest.

The process for managing app-signing settings is different, depending on whether you're using private Android or iOS devices.

Skip App Re-signing on Android Devices

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

Skip App Re-signing on iOS Devices

Apple requires that you sign apps for testing before they can be loaded onto a device. For iOS devices, you have two options for signing your app. The option you choose depends on whether you're using:

  • In-house (Enterprise) developer provisioning profile

    If you're using this profile, you can skip ahead to create a remote access session to trust your app.

  • Ad-hoc/iOS app development provisioning profile

    If you're using this profile, you must first register the device with your Apple developer account, and then update your provisioning profile to include the private device. Then you must re-sign your app with the provisioning profile you just updated. Then you can run your re-signed app on Device Farm.

To use 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.

    You can get the device UDID and name from the Device instances tab of Project settings or by using the ListDeviceInstances API.

  5. Go to your provisioning profile and choose Edit.

  6. Select the device from the list.

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

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

Create a Remote Access Session to Trust Your 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 you want to test on the private device, or you can install a dummy app that is signed with the same certificate as the app you want to test. The advantage of installing a dummy app is that 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 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, following this procedure in Creating an Instance Profile to Set Up Private Devices to create or modify an instance profile in Device Farm . Add the bundle ID of the test app or the dummy app to Exclude Packages from Cleanup. Attach this 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 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 using the private device instance profile you just created. When you create your session, be sure to select Skip app re-signing.

    
                      Skip app re-signing when creating a remote access session

    In addition, be sure to add the dummy app or the app you want to test to Exclude Packages from Cleanup in the instance profile attached to this instance.

    Important

    To filter quickly for private devices, choose Private device instances only to ensure that you are using the private device with the correct instance profile.

  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.