Repository navigation
fix(signing): enable capabilities through apple id sessions - #178
Conversation
developerservices2 refuses a bundleIdCapabilities create without a capability relationship, answering 409. Both clients read any 409 as "already enabled", so HealthKit and friends were never switched on while provisioning reported them enabled on every run. Link the capability resource on the developerservices2 create, and only accept a 409 when the capability is actually listed afterwards. A refused capability now warns and the profile is issued without it. Closes #177
|
@lasitha-b, hi, could you please try the fix from this branch and report if it works for you
|
|
Thanks! Tested
One leftover: on developerservices2, {
"type": "bundleIdCapabilities",
"id": "<bundleIdResourceId>_HEALTHKIT",
"attributes": {
"ownerType": "BUNDLE",
"enabled": true,
"entitlements": [
{ "key": "HEALTHKIT", "profileKey": "com.apple.developer.healthkit", "...": "..." },
{ "key": "HEALTHKIT_DEVELOPER_ACCESS", "...": "..." },
{ "key": "HEALTHKIT_BACKGROUND_DELIVERY", "...": "..." }
],
"settings": null,
"editable": true,
"inputs": null,
"responseId": "..."
},
"relationships": {
"capability": { "links": { "self": "...", "related": "..." } },
"...": "..."
}
}The |
This comment has been minimized.
This comment has been minimized.
developerservices2 lists a capability without attributes.capabilityType and with a links-only capability relationship, so the listing came back empty: every run sent the create again, and a 409 for a capability that is on would have been reported as refused. Read the type from the resource id, <bundleIdResourceId>_<TYPE>, and skip disabled entries. A capability Apple rejects with any other status, or a backend that refuses the create, now warns and the profile is still issued instead of failing the build.
Integration simulator reportxcross: Failed jobs✅ No failed jobs. Flutter
Compose
Screenshots are Actions artifacts of this run. They open in the browser and expire after 30 days. |
With an Apple ID session, App ID capabilities such as HealthKit were never switched on, yet every run printed
Enabled the HEALTHKIT capability on .... The issued profile lackedcom.apple.developer.healthkitandHKHealthStore.requestAuthorizationfailed on device.developerservices2 needs a
capabilityrelationship on thebundleIdCapabilitiescreate (xtool sends it only for that API: "not public but required iff using ds2 API"). Without it Apple answers 409, and both clients read every 409 as "already enabled".AscPayloads.capabilitytakeslinkCapability, which adds thecapabilitiesrelationship. OnlyDeveloperServicesClientsets it, so the App Store Connect payload is unchanged.attributes.capabilityType, so the listing was always empty there. The type is now read from the resource id,<bundleIdResourceId>_<TYPE>, and entries withenabled: falseare skipped. An enabled capability is no longer requested again on every run.CapabilityRefused, in both clients.Validation:
ce85dc7: HealthKit is enabled and present in the profile for a new and an existing App ID. The listing fix that followed is covered by unit tests only.dart analyzepasses forapple_developer_kitandxcrosstest/appstoreconnectpassesCloses #177