# Registering a test device

You have multiple options to register test devices on [bitrise.io](http://bitrise.io):

- [Open Safari on your iOS device and access the **Test devices** tab from your **Account settings** page](#register-an-ios-device-using-safari).
- [Manually register a device from the **Test devices** tab from your **Account settings** page](#register-a-test-device-manually).

After registering your device on Bitrise, make sure to register it on the [Apple Developer Portal](https://developer.apple.com/) as well. We recommend using the [Xcode Archive & Export for iOS](https://github.com/bitrise-steplib/steps-xcode-archive) Step which can:

- [Register all available test devices of the app](#registering-all-devices-on-the-apple-developer-portal).
- [Register a selection of test devices, defined in a text file that contains a list of their UDIDs](#registering-a-selection-of-devices-on-the-apple-developer-portal).

:::important[Apple Developer Portal device limit]

There is a limit on registrable devices on the Apple Developer Portal, so make sure to [check the list of available test devices of an app](/bitrise-ci/testing/testing-ios-apps/registering-a-test-device#checking-the-available-test-devices-for-an-app) before you use the [Xcode Archive & Export for iOS](https://github.com/bitrise-steplib/steps-xcode-archive) Step to register devices!

:::

## Register an iOS device using Safari

The most comfortable way to register your iOS test device on [bitrise.io](https://www.bitrise.io) is to open [bitrise.io](https://www.bitrise.io) with Safari. This way we can open your device’s Settings and create a temporary profile to get your Unique Device Identifier (UDID). This way you don’t have to look for it and manually copy/paste it.

:::important[Clear the cache]

When trying to install an app from the public install page, you should clear the cache: click the link appearing in the **If you synced your settings from your old device, you need to clear the cache and register your new device** line. The link redirects to the **Account settings** page where you can follow the procedure described below.

The same applies to the [private install page](/bitrise-ci/deploying/bitrise-ota-app-deployment#the-private-install-page): members of your project's Bitrise team can install Ad Hoc and Development builds from it on their registered test devices.

Read more about installing an app from the public install page in our [Deploying an iOS app to Bitrise.io](/bitrise-ci/deploying/ios-deployment/deploying-an-ios-app-to-bitrise-io) guide.

:::

1. Open Safari in **non-incognito mode** on your iOS device and log into [bitrise.io](https://www.bitrise.io).
1. Go to your **Profile**.
1. Tap **Account Settings**.
1. Tap **Test devices** on the left.
1. Tap **Register this device**.
1. In the pop-up window, Tap **Allow** so that [bitrise.io](https://www.bitrise.io) can show your configuration profile.
1. Tap **Install** when the **Install Profile** dialog appears.
1. Enter your devices’s passcode.
1. Tap **Install** on the **Install Profile** again. Now you can see your UDID and your iOS device name in the **Register device** dialog.
1. Tap **Register device**.
1. Register this test device to the [Apple Developer Portal](https://developer.apple.com/) with the correct provisioning profile added to your device or use our [Auto Provisioning](/bitrise-ci/code-signing/ios-code-signing/managing-ios-code-signing-files---automatic-provisioning) step with enabling profile generation.

If you go back to `Test devices`, you can see the registered device.

You can delete the registered device any time if you click on the **Remove** button.

:::note[Safari as default browser]

If you encounter any issues with your registered device, we recommend you make Safari your default browser.

:::

## Register a test device manually

1. On bitrise.io, open the account selector menu on the top right and select **Account settings**.
1. On the menu on the left side, select **Test devices**.
1. Click on **Register device manually**.
1. In the **Register device** dialog, fill out the **Title** field and the **Device Unique Identifier** field with your device’s UDID.
1. Click **Register device**.

   You can **get your UDID** if you plug your device into a computer, and open iTunes. Under **Summary**, you should see a Serial Number. If you click on it, it will reveal your device’s **UDID** which you can paste into the **Device Unique Identifier** field on our [Test Devices](https://app.bitrise.io/users/sign_in#/test_devices).
1. Register this test device to the [Apple Developer Portal](https://developer.apple.com/) with the correct provisioning profile added to your device or use our [Auto Provisioning Step](/bitrise-ci/code-signing/ios-code-signing/managing-ios-code-signing-files---automatic-provisioning) with enabling profile generation.

Now you can see your registered test device under the **Registered test devices** section.

You can remove this registered device any time if you click the **Remove** button.

## Checking the available test devices for an app

For any Bitrise app, you can check out the registered test devices available on the **App Settings** page. This will show an aggregated list of all registered test devices associated with users who have access to your app, regardless of their role. You can use any of those devices to run tests of your app.

You can also download the list of registered devices as a `.json` file.

1. 1. Open your project on Bitrise with a user that has the **Admin** [role on the project](/bitrise-platform/projects/roles-and-permissions-for-bitrise-ci), or a [custom role](/bitrise-platform/workspaces/collaboration-and-permissions-in-workspaces/custom-roles/custom-roles-overview) with the **Edit workflows** permission.
1. On the main page of the project, click on the **Project settings** button.
1. On the menu on the left side, select **Test devices**.
1. Optionally, you can download the entire list as a `.json` file: click the **Download as json** button.

## Registering devices on the Apple Developer Portal with the Xcode Archive Step

The **Xcode Archive & Export for iOS** Step allows you to automatically register your test devices on the Apple Developer Portal. By default, the Step registers all test devices that you registered to your Bitrise account but you can configure it to only register a specific selection of devices.

:::important[Apple Developer Portal limit]

Please note that the Apple Developer Portal has a limit for devices registered for testing purposes, typically set at 100 devices per account. Devices registered with the **Xcode Archive & Export for iOS** Step count towards this limit and you can only remove registered devices once a year.

:::

### Registering all devices on the Apple Developer Portal

**Workflow Editor**

1. Register your devices on Bitrise.

   - [Register using an iOS device](/bitrise-ci/testing/testing-ios-apps/registering-a-test-device#register-an-ios-device-using-safari).
   - [Register manually on the **Account settings** page](/bitrise-ci/testing/testing-ios-apps/registering-a-test-device#register-a-test-device-manually).
1. 1. Log in to Bitrise and select **Bitrise CI** on the left, then select your project.
1. Click the **Workflows** button on the main page.
1. Add the **Xcode Archive & Export for iOS** Step to your Workflow.
1. In the **Automatic code signing** input group, set the **Register test devices on the Apple Developer Portal** input to `yes`.

**Configuration YAML**

1. Register your devices on Bitrise.

   - [Register using an iOS device](/bitrise-ci/testing/testing-ios-apps/registering-a-test-device#register-an-ios-device-using-safari).
   - [Register manually on the **Account settings** page](/bitrise-ci/testing/testing-ios-apps/registering-a-test-device#register-a-test-device-manually).
1. In the Configuration YAML file, add the `xcode-archive` Step to your Workflow.

   ```yaml
   your-workflow:
     steps:
       - git-clone: {}
       - xcode-archive:
           inputs:
   ```
1. Set the `register_test_devices` input to `yes`.

   ```yaml
   your-workflow:
     steps:
       - git-clone: {}
       - xcode-archive:
           inputs:
           - register_test_devices: 'yes'
   ```

### Registering a selection of devices on the Apple Developer Portal

**Workflow Editor**

1. Get the UDID of the devices you want to register: [Checking the available test devices for an app](/bitrise-ci/testing/testing-ios-apps/registering-a-test-device#checking-the-available-test-devices-for-an-app).
1. Create a `.txt` file and add the UDIDs of all devices you want to register to the file in a comma-separated list:

   ```text
   00000000-0000000000000001,00000000-0000000000000002,00000000-0000000000000003
   ```
1. Make sure Bitrise can access the file in a Workflow:

   You can commit it to your repository.

   [You can upload it to the Generic File Storage and use the **File Downloader** Step to access it](/bitrise-ci/run-and-analyze-builds/managing-build-files/using-files-in-your-builds#downloading-a-file-using-the-file-downloader-step).

   You can dynamically generate the file during the build.
1. 1. Log in to Bitrise and select **Bitrise CI** on the left, then select your project.
1. Click the **Workflows** button on the main page.
1. Add the **Xcode Archive & Export for iOS** Step to your Workflow.
1. In the **Automatic code signing** input group, set the **Register test devices on the Apple Developer Portal** input to **yes**.
1. In the same input group, add the path to the `.txt` file containing the UDIDs to the **Path of file containing the devices to be registered** input.

   :::note[Devices registered on Bitrise]

   This input takes priority over the devices registered to your Bitrise account.

   :::

**Configuration YAML**

1. Get the UDID of the devices you want to register: [Checking the available test devices for an app](/bitrise-ci/testing/testing-ios-apps/registering-a-test-device#checking-the-available-test-devices-for-an-app).
1. Create a `.txt` file and add the UDIDs of all devices you want to register to the file in a comma-separated list:

   ```text
   00000000-0000000000000001,00000000-0000000000000002,00000000-0000000000000003
   ```
1. Make sure Bitrise can access the file in a Workflow:

   You can commit it to your repository.

   [You can upload it to the Generic File Storage and use the **File Downloader** Step to access it](/bitrise-ci/run-and-analyze-builds/managing-build-files/using-files-in-your-builds#downloading-a-file-using-the-file-downloader-step).

   You can dynamically generate the file during the build.
1. In the Configuration YAML file, add the `xcode-archive` Step to your Workflow.

   ```yaml
   your-workflow:
     steps:
       - git-clone: {}
       - xcode-archive:
           inputs:
   ```
1. Set the `register_test_devices` input to `yes`.

   ```yaml
   your-workflow:
     steps:
       - git-clone: {}
       - xcode-archive:
           inputs:
           - register_test_devices: 'yes'
   ```
1. Set the path to the `.txt` file containing the UDIDs in the `test_device_list_path` input.

   :::note[Devices registered on Bitrise]

   This input takes priority over the devices registered to your Bitrise account.

   :::

   ```yaml
   your-workflow:
     steps:
       - git-clone: {}
       - xcode-archive:
           inputs:
           - register_test_devices: 'yes'
           - test_device_list_path: path/to/the/file
   ```
