Skip to content

Commit 5d3bb55

Browse files
committed
edits
1 parent 23dbc74 commit 5d3bb55

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

docs/pipelines/apps/mobile/app-signing.md

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,16 @@ In Azure Pipelines **Libraries** > **Secure files**, select **+ Secure file** an
3030

3131
# [YAML](#tab/yaml)
3232

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:
3434

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`.
3636
- `<apksign>` must be `true`, which is the default.
3737
- `<keystore-file>` is the name of your uploaded keystore file in the secure files library.
3838
- `<apksignerKeystorePassword>` is the password to the unencrypted keystore file.
3939
- `<apksignerKeystoreAlias>` is the key alias for the signing certificate.
4040
- `<apksignerKeyPassword>` is the password for the key associated with the specified alias.
4141

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.
4343

4444
```yaml
4545
variables:
@@ -61,20 +61,18 @@ steps:
6161
6262
# [Classic](#tab/classic)
6363
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.
7065
7166
On the pipeline **Variables** tab, add the following variables:
7267
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.
7570
- **key-password**: Password for the key associated with the specified alias. Be sure to select the **lock** icon.
7671
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.
7876

7977
---
8078

@@ -84,7 +82,7 @@ Any build agent can now securely sign your app without any certificate managemen
8482
## Apple iOS, macOS, tvOS, or watchOS app signing
8583

8684
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/
8886
### Get your P12 signing certificate
8987

9088
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*
10098

10199
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).
102100

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.
104102

105103
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.
106104

107105
### Get your provisioning profile
108106

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/).
110108

111109
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**.
112110

113111
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.
114112

115113
### Add the signing and provisioning tasks to the pipeline
116114

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).
118116

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.
120118

121119
#### Install the certificate and profile during each build
122120

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.
124122

125123
# [YAML](#tab/yaml)
126124

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`.
128126

129127
```yaml
130128
- task: InstallAppleCertificate@2
@@ -133,7 +131,7 @@ Add the [InstallAppleCertificate@2](/azure/devops/pipelines/tasks/reference/inst
133131
certPwd: '$(<P12password>)'
134132
```
135133

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.
137135

138136
```yaml
139137
- task: InstallAppleProvisioningProfile@1
@@ -146,14 +144,15 @@ Also add the [InstallAppleProvisioningProfile@1](/azure/devops/pipelines/tasks/r
146144

147145
# [Classic](#tab/classic)
148146

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:
150148

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.
152150
- In the **Certificate (P12) password** field, reference the *$(P12password)* variable you created.
153151

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:
155153

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.
157156
- Select the checkbox labeled **Remove profile after build** to remove the provisioning profile from the agent machine after the build.
158157

159158
---
@@ -162,13 +161,13 @@ Any build agent can now securely sign your app without any certificate or profil
162161

163162
#### Preinstall the certificate and profile on a macOS build agent
164163

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.
166165

167166
**Preinstall the P12 certificate**
168167

169168
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.
170169

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.
172171

173172
```
174173
sudo security import <certificate.p12> -P <password>
@@ -188,7 +187,7 @@ sudo cp <profile> ~/Library/MobileDevice/Provisioning Profiles/<UUID>.mobileprov
188187
189188
# [YAML](#tab/yaml)
190189
191-
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:
192191
193192
- `certSecureFile`: The name of your uploaded *.p12* file.
194193
- `certPwd`: The variable for the secure `P12password`.
@@ -208,7 +207,7 @@ Add the [InstallAppleCertificate@2](/azure/devops/pipelines/tasks/reference/inst
208207
deleteCert: false
209208
```
210209

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:
212211

213212
- Set `provProfileSecureFile` to the name of your provisioning profile file.
214213
- Set `removeProfile` to `false` to retain the profile between builds.
@@ -222,16 +221,17 @@ Also add the [InstallAppleProvisioningProfile@1](/azure/devops/pipelines/tasks/r
222221
223222
# [Classic](#tab/classic)
224223
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:
226225
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.
228227
- 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.
230229
- Deselect the **Delete certificate from keychain** check box to keep the certificate on the agent machine after the build.
231230
232231
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:
233232
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.
235235
- Deselect the **Remove profile after build** check box to keep the provisioning profile on the agent machine after the build.
236236
237237
---
@@ -240,9 +240,9 @@ The macOS build agent can now securely sign and provision your app for all build
240240
241241
### Reference the secure files in the Xcode build task
242242
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.
244244
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.
246246

247247
# [YAML](#tab/yaml)
248248

@@ -256,11 +256,11 @@ The secure files references in the build tasks use variables for the `signingIde
256256

257257
# [Classic](#tab/classic)
258258

259-
In the **Xcode** task settings:
259+
In the **Xcode build** task settings:
260260

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)*.
264264

265265
---
266266

0 commit comments

Comments
 (0)