codemagic-ci-cd / cli-tools

Various utilities to managing Android and iOS app builds, code signing, and deployment.
https://codemagic.io/start/
GNU General Public License v3.0
245 stars 42 forks source link

Feature: register-device supports multiple UDIDs #331

Closed artemii-yanushevskyi closed 1 year ago

artemii-yanushevskyi commented 1 year ago
  1. Update app-store-connect register-device to accept now accepts multiple UDIDs from a file or an environment variable as a source.
  2. Introduce --ignore-registration-errors flag for app-store-connect register-device to continue registering devices despite errors.
  3. Introduce short flags for app-store-connect register-device:
    • -n flag for the device name,
    • -u flag for the UDIDs.
Demonstration of the command and its output ## File content ``` 00000000-000000000000001E 00000000-000000000000002E 00000000-000000000000003X ``` UDIDs in file: 1. Valid UDID, but the device is present. 2. Valid UDID, the device doesn't yet exists and will be registered 3. Invalid UDID ## Command ```shell app-store-connect register-device -n iPhone -u @file:Device\ UDIDs.txt --ignore-registration-errors ``` ## Output ``` Creating new Device: udid: 00000000-000000000000001E, name: iPhone, platform: IOS Failed to register a device: POST https://api.appstoreconnect.apple.com/v1/devices returned 409: There is a problem with the request entity - A device with number '00000000-000000000000001E' already exists on this team. Creating new Device: udid: 00000000-000000000000002E, name: iPhone, platform: IOS -- Device (Created) -- Id: H2985X3P8Q Type: devices Class: IPOD Name: iPhone Platform: IOS Status: ENABLED Udid: 00000000-000000000000002E Created Device H2985X3P8Q Creating new Device: udid: 00000000-000000000000003X, name: iPhone, platform: IOS Failed to register a device: POST https://api.appstoreconnect.apple.com/v1/devices returned 409: An attribute in the provided entity has invalid value - An invalid value '00000000-000000000000003X' was provided for the parameter 'udid'. ``` The syntax highlight demonstration image

Previous PR for the related functionality.