Member-only story
Automatically add new devices to the Apple Developer Portal (GitHub Actions & Fastlane)
It’s no secret that in order to install Beta/Staging builds on your real iPhone device, you must first register it. You can perform it manually, but you’ll need special admin privileges. Automatization is a different strategy to remove the human factor.
The approach must be easy and practical.
- Your repository contains a file named
devices.txt
that lists the allowed "UDIDs." - After the addition of a fresh device to that list, the developer will submit a PR for code review.
- A CI/CD job that will run after the PR has been approved and merged to the main branch
- That’s it. Install the app after being rebuilt with a new provisioning profile.
Let's go over the implementation now. As an example, consider GitHub Actions and Fastlane.
First, we require a file called “devices.txt”
The file format is displayed below (or you can view an Apple Sample):
<UDID>tabulation<Name>tabulation<Type: ios or mac>
Example:
Device ID Device Name Device Platform
a02fc03df7e12c5fb1ec247e8a14e2c3e4b7d68d My iPhoneX ios
00006000-000C551C02D2801E My MacBook mac
00008120-000C3C262478C09E My iPhone14 ios