Skip to content

Commit

Permalink
Update/appstoreapikey (#634)
Browse files Browse the repository at this point in the history
* Add partial for app store connect API key

* Add app-store-connect-api-key partial to signing-ios.md

* using-partials-for-creating-app-store-api-key-section

Co-authored-by: Kevin Suhajda <[email protected]>
Co-authored-by: Nihal Aghazada <[email protected]>
  • Loading branch information
3 people authored Dec 8, 2021
1 parent 3bfd06a commit 452c7ef
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 35 deletions.
Empty file added .hugo_build.lock
Empty file.
10 changes: 1 addition & 9 deletions content/configuration/build-versioning.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,7 @@ It can be found under **General > App Information > Apple ID** under your applic
If you use `codemagic.yaml` config and you have [Automatic code signing](/yaml-code-signing/signing-ios/#automatic-code-signing) setup, you are good to go directly to [Set the build number with `agvtool`](#set-the-build-number-with-agvtool)
{{</notebox>}}

### Creating the App Store Connect API key

It is recommended to create a dedicated App Store Connect API key for Codemagic in [App Store Connect](https://appstoreconnect.apple.com/access/api). To do so:

1. Log in to App Store Connect and navigate to **Users and Access > Keys**.
2. Click on the + sign to generate a new API key.
3. Enter the name for the key and select an access level. We recommend choosing either `Developer` or `App Manager`, read more about Apple Developer Program role permissions [here](https://help.apple.com/app-store-connect/#/deve5f9a89d7).
4. Click **Generate**.
5. As soon as the key is generated, you can see it added to the list of active keys. Click **Download API Key** to save the private key for later. Note that the key can only be downloaded once.
{{< include "/partials/app-store-connect-api-key.md">}}

### Saving the API access arguments to environment variables

Expand Down
16 changes: 16 additions & 0 deletions content/partials/app-store-connect-api-key.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
---

### Creating the App Store Connect API key

It is recommended to create a dedicated App Store Connect API key for Codemagic in [App Store Connect](https://appstoreconnect.apple.com/access/api). To do so:

1. Log in to App Store Connect and navigate to **Users and Access > Keys**.
2. Click on the + sign to generate a new API key.
3. Enter the name for the key and select an access level. We recommend choosing `App Manager` access rights, read more about Apple Developer Program role permissions [here](https://help.apple.com/app-store-connect/#/deve5f9a89d7).
4. Click **Generate**.
5. As soon as the key is generated, you can see it added to the list of active keys. Click **Download API Key** to save the private key for later. Note that the key can only be downloaded once.

{{<notebox >}}
Take note of the **Issuer ID** above the table of active keys as well as the **Key ID** of the generated key as these will be required when setting up the Apple Developer Portal integration in the Codemagic UI.
{{</notebox>}}
15 changes: 1 addition & 14 deletions content/yaml-code-signing/signing-ios.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,7 @@ Under the hood, we use [Codemagic CLI tools](https://github.com/codemagic-ci-cd/

In order to use automatic code signing and have Codemagic manage signing certificates and provisioning profiles on your behalf, you need to configure API access to App Store Connect.

### Creating the App Store Connect API key

It is recommended to create a dedicated App Store Connect API key for Codemagic in [App Store Connect](https://appstoreconnect.apple.com/access/api). To do so:

1. Log in to App Store Connect and navigate to **Users and Access > Keys**.
2. Click on the + sign to generate a new API key.
3. Enter the name for the key and select an access level. We recommend choosing `App Manager` access rights, read more about Apple Developer Program role permissions [here](https://help.apple.com/app-store-connect/#/deve5f9a89d7).
4. Click **Generate**.
5. As soon as the key is generated, you can see it added to the list of active keys. Click **Download API Key** to save the private key for later. Note that the key can only be downloaded once.

{{<notebox >}}
Take note of the **Issuer ID** above the table of active keys as well as the **Key ID** of the generated key as these will be required when setting up the Apple Developer Portal integration in the Codemagic UI.
{{</notebox>}}

{{< include "/partials/app-store-connect-api-key.md" >}}
### Saving the API key to environment variables

Save the API key and the related information in the **Environment variables** section in Codemagic UI. Click **Secure** to encrypt the values. Note that binary files (i.e. provisioning profiles & .p12 certificate) have to be [`base64 encoded`](../variables/environment-variable-groups/#storing-sensitive-valuesfiles) locally before they can be saved to **Environment variables** and decoded during the build. Below are the following environment variables:
Expand Down
13 changes: 1 addition & 12 deletions content/yaml-code-signing/signing-macos.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,8 @@ Under the hood, we use [Codemagic CLI tools](https://github.com/codemagic-ci-cd/

In order to use automatic code signing and have Codemagic manage signing certificates and provisioning profiles on your behalf, you need to configure API access to App Store Connect.

### Creating the App Store Connect API key
{{< include "/partials/app-store-connect-api-key.md">}}

It is recommended to create a dedicated App Store Connect API key for Codemagic in [App Store Connect](https://appstoreconnect.apple.com/access/api). To do so:

1. Log in to App Store Connect and navigate to **Users and Access > Keys**.
2. Click on the + sign to generate a new API key.
3. Enter the name for the key and select an access level. We recommend choosing either `Developer` or `App Manager`, read more about Apple Developer Program role permissions [here](https://help.apple.com/app-store-connect/#/deve5f9a89d7).
4. Click **Generate**.
5. As soon as the key is generated, you can see it added to the list of active keys. Click **Download API Key** to save the private key for later. Note that the key can only be downloaded once.

{{<notebox >}}
Take note of the **Issuer ID** above the table of active keys as well as the **Key ID** of the generated key as these will be required when setting up the Apple Developer Portal integration in the Codemagic UI.
{{</notebox>}}

### Saving the API key to environment variables

Expand Down

0 comments on commit 452c7ef

Please sign in to comment.