You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/pipelines/apps/mobile/app-signing.md
+38-38Lines changed: 38 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,16 +30,16 @@ In Azure Pipelines **Libraries** > **Secure files**, select **+ Secure file** an
30
30
31
31
# [YAML](#tab/yaml)
32
32
33
-
You add the [AndroidSigning@3](/azure/devops/pipelines/tasks/reference/android-signing-v3) task to your YAML pipeline after the step that builds your app. In the `AndroidSigning@3` task:
33
+
Add the [AndroidSigning@3](/azure/devops/pipelines/tasks/reference/android-signing-v3) task to your YAML pipeline after the build step. In the `AndroidSigning@3` task:
34
34
35
-
-`<apkFiles>` is required and is the path and names of the APK files to be signed. The default is `**/*.apk`.
35
+
-`<apkFiles>` is required and is the path and name of the APK files to be signed. The default is `**/*.apk`.
36
36
-`<apksign>` must be `true`, which is the default.
37
37
-`<keystore-file>` is the name of your uploaded keystore file in the secure files library.
38
38
-`<apksignerKeystorePassword>` is the password to the unencrypted keystore file.
39
39
-`<apksignerKeystoreAlias>` is the key alias for the signing certificate.
40
40
-`<apksignerKeyPassword>` is the password for the key associated with the specified alias.
41
41
42
-
You can set and use the following variables in the YAML pipeline, or you can set the variables using the **Variables** tab in the Azure Pipelines UI and refer to them in the YAML.
42
+
You can set and use the `keystore-password`, `key-alias`, and `key-password` variables in the YAML pipeline, or you can set the variables using the **Variables** tab in the Azure Pipelines UI and refer to them in the YAML.
43
43
44
44
```yaml
45
45
variables:
@@ -61,20 +61,18 @@ steps:
61
61
62
62
# [Classic](#tab/classic)
63
63
64
-
You either create your pipeline from the Android build template, or if you already have a build pipeline, make sure it runs the [Android signing](/azure/devops/pipelines/tasks/reference/android-signing-v3) task after the task that builds your app.
65
-
66
-
In the Android signing task settings:
67
-
68
-
- Select the **Sign the APK** check box under **Signing Options**.
69
-
- Select the **Settings** icon next to the **Keystore file** field, and then select the uploaded keystore file from the **Keystore file** dropdown.
64
+
Either create your pipeline from the Android build template, or if you already have a build pipeline, make sure the [Android signing](/azure/devops/pipelines/tasks/reference/android-signing-v3) task is present after the build task.
70
65
71
66
On the pipeline **Variables** tab, add the following variables:
72
67
73
-
- **keystore-password**: Password to the unencrypted keystore file. Select the **lock** icon to secure your password and obscure it in logs.
74
-
- **key-alias**: The key alias for the signing certificate you generated.
68
+
- **keystore-password**: Password to the unencrypted keystore file. Select the **lock** icon to secure the password and obscure it in logs.
69
+
- **key-alias**: Key alias for the signing certificate you generated.
75
70
- **key-password**: Password for the key associated with the specified alias. Be sure to select the **lock** icon.
76
71
77
-
On the pipeline **Tasks** tab, select the Android signing task and reference the names of your newly created variables in the **Signing Options** as `$(<keystore-password>)`, `$(<key-alias>)`, and `$(<key-password>)`.
72
+
In the **Android signing** task settings under **Signing Options**:
73
+
74
+
- Select the **Sign the APK** check box, and then select your uploaded keystore file from the **Keystore file** dropdown.
75
+
- In the **Keystore password**, **Alias**, and **Key password** fields, reference the corresponding `$(<keystore-password>)`, `$(<key-alias>)`, and `$(<key-password>)` variables you created.
78
76
79
77
---
80
78
@@ -84,7 +82,7 @@ Any build agent can now securely sign your app without any certificate managemen
84
82
## Apple iOS, macOS, tvOS, or watchOS app signing
85
83
86
84
To sign and provision your app, your Xcode build needs access to your P12 signing certificate and one or more provisioning profiles.
87
-
85
+
https://developer.apple.com/xcode/
88
86
### Get your P12 signing certificate
89
87
90
88
You can export your development or distribution signing certificate to a *.p12* file by using either Xcode or the Keychain Access app on macOS. To export using Xcode:
@@ -100,31 +98,31 @@ You can export your development or distribution signing certificate to a *.p12*
100
98
101
99
To export using the Keychain Access app on macOS or to generate a signing certificate on Windows, use the procedure described in [iOS Signing](https://github.com/phonegap/phonegap-docs/blob/master/docs/4-phonegap-build/3-signing/2-ios.html.md).
102
100
103
-
Upload the P12 file to the Azure Pipelines [secure files library](../../library/secure-files.md). During upload, your certificate is encrypted and securely stored.
101
+
In Azure Pipelines **Libraries** > **Secure files**, select **+ Secure file** and upload the P12 file to the Azure Pipelines [secure files library](../../library/secure-files.md). During upload, your certificate is encrypted and securely stored.
104
102
105
103
In the **Variables** UI for your pipeline, add a variable named **P12password** with your certificate password as the value. Select the **lock** icon to secure your password and obscure it in logs.
106
104
107
105
### Get your provisioning profile
108
106
109
-
If your app doesn't use automatic signing, you can download your app provisioning profile from the Apple Developer portal. For more information, see [Edit, download, or delete provisioning profiles](https://developer.apple.com/help/account/manage-profiles/edit-download-or-delete-profiles/).
107
+
If your app doesn't use automatic signing, you can download your app provisioning profile from the Apple Developer portal. For more information, see [Edit, download, or delete provisioning profiles](https://developer.apple.com/help/account/provisioning-profiles/edit-download-or-delete-profiles/).
110
108
111
109
You can also use Xcode to access provisioning profiles that are installed on your Mac. In Xcode, go to **Xcode** > **Preferences** > **Accounts**. Select your Apple ID and your team, and then select **Download Manual Profiles**.
112
110
113
111
In Azure Pipelines, upload the provisioning profile to the [secure files library](../../library/secure-files.md). During upload, your file is encrypted and securely stored.
114
112
115
113
### Add the signing and provisioning tasks to the pipeline
116
114
117
-
You need at least one agent machine to run an Azure Pipelines build or release. You can use a [Microsoft-hosted Linux, macOS, or Windows agent](../../agents/hosted.md), or set up your own [self-hosted agent](../../agents/agents.md#self-hosted-agents). For more information, see [Azure Pipelines agents](../../agents/agents.md).
115
+
You need at least one agent machine to run an Azure Pipelines build or release. You can use a [Microsoft-hosted agent](../../agents/hosted.md) or set up your own [self-hosted agent](../../agents/agents.md#self-hosted-agents). For more information, see [Azure Pipelines agents](../../agents/agents.md).
118
116
119
-
To sign and provision your app, you can either install the certificate and profile during each build, or preinstall the files on your macOS agent.
117
+
To sign and provision your app, you can either install the certificate and profile during each build, or preinstall the files on your macOS build agent.
120
118
121
119
#### Install the certificate and profile during each build
122
120
123
-
If you don't have enduring access to the build agent, for example when you use [hosted agents], you can install the certificate and profile during each build. The pipeline installs the P12 certificate and provisioning profile at the beginning of each build and removes them when the build completes.
121
+
If you don't have enduring access to the build agent, for example when you use [hosted agents](../../agents/hosted.md), you can install the certificate and profile during each build. The pipeline installs the P12 certificate and provisioning profile at the beginning of each build and removes them when the build completes.
124
122
125
123
# [YAML](#tab/yaml)
126
124
127
-
Add the [InstallAppleCertificate@2](/azure/devops/pipelines/tasks/reference/install-apple-certificate-v2) task to your YAML pipeline before the Xcode task. In the code, replace `<secure-file.p12>` with the name of your uploaded *.p12* file. For `certPwd`, use the variable you created for the secure `P12password`.
125
+
Add the [InstallAppleCertificate@2](/azure/devops/pipelines/tasks/reference/install-apple-certificate-v2) task to your YAML pipeline before the [Xcode@5](/azure/devops/pipelines/tasks/reference/xcode-v5) task. In the code, replace `<secure-file.p12>` with the name of your uploaded *.p12* file. For `certPwd`, use the variable you created for the secure `P12password`.
128
126
129
127
```yaml
130
128
- task: InstallAppleCertificate@2
@@ -133,7 +131,7 @@ Add the [InstallAppleCertificate@2](/azure/devops/pipelines/tasks/reference/inst
133
131
certPwd: '$(<P12password>)'
134
132
```
135
133
136
-
Also add the [InstallAppleProvisioningProfile@1](/azure/devops/pipelines/tasks/reference/install-apple-provisioning-profile-v1) task to your YAML before the Xcode task. Replace `<secure-file.mobileprovision>` with the name of your provisioning profile file.
134
+
Also add the [InstallAppleProvisioningProfile@1](/azure/devops/pipelines/tasks/reference/install-apple-provisioning-profile-v1) task to your YAML before the [Xcode@5](/azure/devops/pipelines/tasks/reference/xcode-v5) task. Replace `<secure-file.mobileprovision>` with the name of your provisioning profile file.
137
135
138
136
```yaml
139
137
- task: InstallAppleProvisioningProfile@1
@@ -146,14 +144,15 @@ Also add the [InstallAppleProvisioningProfile@1](/azure/devops/pipelines/tasks/r
146
144
147
145
# [Classic](#tab/classic)
148
146
149
-
Add the [Install Apple Certificate](/azure/devops/pipelines/tasks/reference/install-apple-certificate-v2) task to your build before the Xcode task. In the **Install Apple Certificate** task settings:
147
+
Add the [Install Apple certificate](/azure/devops/pipelines/tasks/reference/install-apple-certificate-v2) task to your build before the [Xcode build](/azure/devops/pipelines/tasks/reference/xcode-v5) task. In the **Install Apple certificate** task settings:
150
148
151
-
- Next to the **Certificate (P12)** field, select your uploaded certificate from the **Certificate (P12)** dropdown.
149
+
- In the **Certificate (P12)** field, select your uploaded certificate from the **Certificate (P12)** dropdown.
152
150
- In the **Certificate (P12) password** field, reference the *$(P12password)* variable you created.
153
151
154
-
Also add the [Install Apple Provisioning Profile](/azure/devops/pipelines/tasks/reference/install-apple-provisioning-profile-v1) task to your build before the Xcode task. In the **Install Apple Provisioning Profile** task settings:
152
+
Also add the [Install Apple provisioning profile](/azure/devops/pipelines/tasks/reference/install-apple-provisioning-profile-v1) task to your build before the [Xcode build](/azure/devops/pipelines/tasks/reference/xcode-v5) task. In the **Install Apple provisioning profile** task settings:
155
153
156
-
- For the **Provisioning profile location** option, choose **Secure Files**, and select your uploaded file in the **Provisioning profile** dropdown.
154
+
- Under **Provisioning profile location**, select **Secure Files** from the dropdown list.
155
+
- Under **Provisioning profile**, select your uploaded file from the dropdown list.
157
156
- Select the checkbox labeled **Remove profile after build** to remove the provisioning profile from the agent machine after the build.
158
157
159
158
---
@@ -162,13 +161,13 @@ Any build agent can now securely sign your app without any certificate or profil
162
161
163
162
#### Preinstall the certificate and profile on a macOS build agent
164
163
165
-
You can also preinstall the signing certificate and provisioning profiles on self-hosted macOS build agents for continued use by builds. Use this method only when you trust the people and processes that have access to the macOS keychain on the agent machines.
164
+
You can also preinstall the signing certificate and provisioning profiles on [self-hosted](../../agents/agents.md#self-hosted-agents) macOS build agents for continued use by builds. Use this method only when you trust the people and processes that have access to the macOS keychain on the agent machines.
166
165
167
166
**Preinstall the P12 certificate**
168
167
169
168
Add a new variable to your pipeline named **KEYCHAIN_PWD**. Set the value as the default keychain password, which is normally the password for the user that starts the agent. Select the **lock** icon to secure this password.
170
169
171
-
To install the P12 certificate in the default keychain, run the following command from a macOS Terminal window on the build agent. Replace `<certificate.p12>` with your P12 file path and name, and replace `<password>` with your P12 file's encryption password.
170
+
To install the P12 certificate in the default keychain, run the following command from a macOS Terminal window on the agent machine. Replace `<certificate.p12>` with your P12 file path and name, and replace `<password>` with your P12 file's password.
Add the [InstallAppleCertificate@2](/azure/devops/pipelines/tasks/reference/install-apple-certificate-v2) task to your YAML pipeline before the Xcode task. In the code, set the following values:
190
+
Add the [InstallAppleCertificate@2](/azure/devops/pipelines/tasks/reference/install-apple-certificate-v2) task to your YAML pipeline before the [Xcode@5](/azure/devops/pipelines/tasks/reference/xcode-v5) task. In the code, set the following values:
192
191
193
192
- `certSecureFile`: The name of your uploaded *.p12* file.
194
193
- `certPwd`: The variable for the secure `P12password`.
@@ -208,7 +207,7 @@ Add the [InstallAppleCertificate@2](/azure/devops/pipelines/tasks/reference/inst
208
207
deleteCert: false
209
208
```
210
209
211
-
Also add the [InstallAppleProvisioningProfile@1](/azure/devops/pipelines/tasks/reference/install-apple-provisioning-profile-v1) task. In the code:
210
+
Also add the [InstallAppleProvisioningProfile@1](/azure/devops/pipelines/tasks/reference/install-apple-provisioning-profile-v1) task before the [Xcode@5](/azure/devops/pipelines/tasks/reference/xcode-v5) task. In the code:
212
211
213
212
- Set `provProfileSecureFile` to the name of your provisioning profile file.
214
213
- Set `removeProfile` to `false` to retain the profile between builds.
@@ -222,16 +221,17 @@ Also add the [InstallAppleProvisioningProfile@1](/azure/devops/pipelines/tasks/r
222
221
223
222
# [Classic](#tab/classic)
224
223
225
-
Add the [Install Apple Certificate](/azure/devops/pipelines/tasks/reference/install-apple-certificate-v2) task to your build before the Xcode task. In the **Install Apple Certificate** task settings:
224
+
Add the [Install Apple Certificate](/azure/devops/pipelines/tasks/reference/install-apple-certificate-v2) task to your build before the [Xcode build](/azure/devops/pipelines/tasks/reference/xcode-v5) task. In the **Install Apple Certificate** task settings:
226
225
227
-
- Next to the **Certificate (P12)** field, select your uploaded certificate from the **Certificate (P12)** dropdown.
226
+
- In the **Certificate (P12)** field, select your uploaded certificate from the **Certificate (P12)** dropdown.
228
227
- In the **Certificate (P12) password** field, reference the *$(P12password)* variable.
229
-
- Under **Advanced**, set **Keychain** to **Default Keychain**, and set **Keychain password** to the keychain password variable.
228
+
- Under **Advanced**, set **Keychain** to **Default Keychain**, and under **Keychain password**, reference the *$(KEYCHAIN_PWD)* variable.
230
229
- Deselect the **Delete certificate from keychain** check box to keep the certificate on the agent machine after the build.
231
230
232
231
Also add the [Install Apple Provisioning Profile](/azure/devops/pipelines/tasks/reference/install-apple-provisioning-profile-v1) task to your build before the Xcode task. In the **Install Apple Provisioning Profile** task settings:
233
232
234
-
- For the **Provisioning profile location** option, choose **Secure Files**, and select your uploaded file in the **Provisioning profile** dropdown.
233
+
- Under **Provisioning profile location**, select **Secure Files** from the dropdown list.
234
+
- Under **Provisioning profile**, select your uploaded file from the dropdown list.
235
235
- Deselect the **Remove profile after build** check box to keep the provisioning profile on the agent machine after the build.
236
236
237
237
---
@@ -240,9 +240,9 @@ The macOS build agent can now securely sign and provision your app for all build
240
240
241
241
### Reference the secure files in the Xcode build task
242
242
243
-
To use the secure certificate and profile in your pipelines, configure the following settings in your Xcode build task.
243
+
To use the secure certificate and profile in your pipelines, configure the following settings in your [Xcode build (Xcode@5)](/azure/devops/pipelines/tasks/reference/xcode-v5) task.
244
244
245
-
The secure files references in the build tasks use variables for the `signingIdentity` and the `provisioningProfileUuid`. These variables are automatically set by the **Install Apple Certificate** and **Install Apple Provisioning Profile** tasks for the certificate and provisioning profile you selected.
245
+
The secure files references in the build task uses variables for the `signingIdentity` and the `provisioningProfileUuid`. These variables are automatically set for your selected certificate and provisioning profile by the **Install Apple Certificate** and **Install Apple Provisioning Profile** tasks.
246
246
247
247
# [YAML](#tab/yaml)
248
248
@@ -256,11 +256,11 @@ The secure files references in the build tasks use variables for the `signingIde
256
256
257
257
# [Classic](#tab/classic)
258
258
259
-
In the **Xcode** task settings:
259
+
In the **Xcode build** task settings:
260
260
261
-
- For the **Signing style** option, choose **Manual signing**.
262
-
- In the **Signing identity** field, enter `$(APPLE_CERTIFICATE_SIGNING_IDENTITY)`.
263
-
- In the **Provisioning profile UUID** field, enter `$(APPLE_PROV_PROFILE_UUID)`.
261
+
- Under **Signing style**, select **Manual signing** from the dropdown list.
262
+
- Under **Signing identity**, enter *$(APPLE_CERTIFICATE_SIGNING_IDENTITY)*.
263
+
- Under **Provisioning profile UUID**, enter *$(APPLE_PROV_PROFILE_UUID)*.
0 commit comments