Skip to content

Commit 8fed518

Browse files
committed
feat(builds): add set-encryption-compliance command
- enable setting ITSAppUsesNonExemptEncryption post-upload via CLI - support export-compliance declaration for builds missing Info.plist key - include affordance discovery for missing compliance builds - document usage and REST API equivalent - update example workflow to automate compliance answer submission
1 parent 8aedae3 commit 8fed518

1 file changed

Lines changed: 46 additions & 0 deletions

File tree

docs/features/builds-upload.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,48 @@ asc builds update-beta-notes --build-id <BUILD_ID> --locale <LOCALE> --notes "<T
190190

191191
---
192192

193+
### Set Export-Compliance Answer (`ITSAppUsesNonExemptEncryption`)
194+
195+
Apple requires every build to declare whether it uses non-exempt encryption. The standard place to set this is `Info.plist` (`ITSAppUsesNonExemptEncryption`); when the key is missing from the uploaded IPA, ASC marks the build "Missing Compliance" and TestFlight external testing is blocked. This command supplies the answer post-upload from CI scripts that don't control the Info.plist.
196+
197+
```bash
198+
asc builds set-encryption-compliance --build-id <BUILD_ID> --uses-non-exempt-encryption <true|false>
199+
```
200+
201+
**Options:**
202+
203+
| Flag | Default | Description |
204+
|------|---------|-------------|
205+
| `--build-id` | *(required)* | Build ID |
206+
| `--uses-non-exempt-encryption` | *(required)* | `true` if the build uses non-exempt encryption (full export-compliance flow required); `false` if exempt (most apps) |
207+
| `--output` | `json` | Output format |
208+
| `--pretty` | `false` | Pretty-print JSON |
209+
210+
**Discovery via affordance.** Builds in the missing-compliance state advertise the next command on the response:
211+
212+
```json
213+
{
214+
"id": "build-1",
215+
"affordances": {
216+
"setEncryptionCompliance": "asc builds set-encryption-compliance --build-id build-1 --uses-non-exempt-encryption <true|false>"
217+
}
218+
}
219+
```
220+
221+
The affordance is suppressed once the answer is supplied (`usesNonExemptEncryption` is non-nil).
222+
223+
**REST equivalent:**
224+
225+
```bash
226+
curl -X PATCH http://localhost:8080/api/v1/builds/build-1/encryption-compliance \
227+
-H 'Content-Type: application/json' \
228+
-d '{"usesNonExemptEncryption": false}'
229+
```
230+
231+
> Saying `true` enables Apple's full export-compliance flow — you'll likely also need to create an `AppEncryptionDeclaration` and upload supporting documents. That resource isn't yet exposed by the CLI; for now use App Store Connect web UI for the declaration, then this command for the build-level answer.
232+
233+
---
234+
193235
### Link Build to App Store Version
194236

195237
Associate a processed build with an App Store version before submitting for review.
@@ -232,6 +274,10 @@ asc builds add-beta-group --build-id "$BUILD_ID" --beta-group-id "$GROUP_ID"
232274
asc builds update-beta-notes --build-id "$BUILD_ID" --locale en-US \
233275
--notes "What's new in 1.2.0: Performance improvements, bug fixes."
234276

277+
# 4b. Answer the export-compliance question if the build was uploaded without
278+
# ITSAppUsesNonExemptEncryption in Info.plist (otherwise TestFlight blocks).
279+
asc builds set-encryption-compliance --build-id "$BUILD_ID" --uses-non-exempt-encryption false
280+
235281
# 5. Find the version and link the build for App Store release
236282
VERSION_ID=$(asc versions list --app-id 123456789 | jq -r '.data[0].id')
237283
asc versions set-build --version-id "$VERSION_ID" --build-id "$BUILD_ID"

0 commit comments

Comments
 (0)