variants icon indicating copy to clipboard operation
variants copied to clipboard

[iOS] Automatically detect signing certificate type

Open arthurpalves opened this issue 1 year ago • 0 comments

Background

As of now, when providing a signing configuration for iOS, we need to specify in the team_name the entire signing identity name including the certificate type, such as "iPhone Distribution: BACKBASE EUROPE B.V.".

The certificate type might also be Apple Distribution, being it the responsibility of whoever is in charge of editing variants.yml to provide the correct option. This might cause confusion and lead to problems.

Proposed Solution

When only the team name is provided, such as "BACKBASE EUROPE B.V.", automatically detect the certificate type and make use of the appropriate prefix. This can be done in multiple ways, one of which is to check the valid signing identities in the keychain while filtering by the provided team_name and/or team_id (also configured in variants.yml).

i.e.:

security find-identity -v | grep "<TEAM_NAME or TEAM_ID>" | cut -d '"' -f2

arthurpalves avatar Apr 19 '24 10:04 arthurpalves