Invalid String value DEVELOPER_ID_APPLICATION_G2
Problem
Apple API returns DEVELOPER_ID_APPLICATION_G2 as CertificateType that is not presented in the codebase.
Scenario
- Go to https://developer.apple.com/account/resources/profiles/add
- Generate Developer ID. Create a Developer ID provisioning profile to use Apple services with your Developer ID signed applications.
- Run command
asc profiles list \
--api-issuer XXX \
--api-key-id XXX \
--filter-name "test" \
--filter-profile-state active \
--filter-profile-type "mac_app_direct" \
--download-path ~/Library/MobileDevice/Provisioning\ Profiles
Expected behavior
Profiles downloaded to the folder.
Actual behavior
Error:
Error: dataCorrupted(Swift.DecodingError.Context(codingPath: [CodingKeys(stringValue: "included", intValue: nil), _JSONKey(stringValue: "Index 0", intValue: 0), CodingKeys(stringValue: "attributes", intValue: nil), CodingKeys(stringValue: "certificateType", intValue: nil)], debugDescription: "Cannot initialize CertificateType from invalid String value DEVELOPER_ID_APPLICATION_G2", underlyingError: nil)).
Response
...
"included" : [ {
"type" : "certificates",
"id" : "XXX",
"attributes" : {
"serialNumber" : "XXXX",
"certificateContent" : "XXX",
"displayName" : "XXX LLC",
"name" : "Developer ID Application: XXX LLC",
"csrContent" : null,
"platform" : "MAC_OS",
"expirationDate" : "2028-08-17T14:31:40.000+00:00",
"certificateType" : "DEVELOPER_ID_APPLICATION_G2"
},
"relationships" : {
This issue is stale because it has been open for 30 days with no activity. Remove the Stale label or comment or this will be closed in 10 days.
I've just hit this too, annoyingly it seems that Apple don't have this value in their OpenAPI spec. That just contains...
"enum" : [ "IOS_DEVELOPMENT", "IOS_DISTRIBUTION", "MAC_APP_DISTRIBUTION", "MAC_INSTALLER_DISTRIBUTION", "MAC_APP_DEVELOPMENT", "DEVELOPER_ID_KEXT", "DEVELOPER_ID_APPLICATION", "DEVELOPMENT", "DISTRIBUTION", "PASS_TYPE_ID", "PASS_TYPE_ID_WITH_NFC" ]
...and is missing DEVELOPER_ID_APPLICATION_G2