Hello!
I've been facing an issue with notarizing a macOS app with an Enterprise API Key.
Due to some misunderstanding setting up the project some years ago, the notarization step was using a developer's accounts API Key. I am looking to fix it to have everything centralized in the Enterprise account we work with, but I get "Debug [JWT] Generating new JWT for key ID" with the new key. This is using the xcrun notarytool
directly to get more input.
Using Fastlane it fails as: Error polling for notarization info: [11:29:25]: unexpected token at ''
The project is deployed via MDM, so we need it to prevent the security warning.
I used this documentation to create the key: https://developer.apple.com/documentation/enterpriseprogramapi/creating-api-keys-for-enterprise-program-api
I have tried a Developer and an Admin access key, and the Account Holder has also created an Admin key but the errors keep the same.
I just updated my Fastlane script to use the new key with the updated values. The old developer account key still works.
I am not sure if I am missing any steps in the documentation or if this is not achievable.
Important to add that all the profiles and certificates were already set up properly in the Enterprise account, the only error was using an App Store Connect Key instead of an Enterprise Key.
Thanks in advance for the help.
Hello @Xandi, thanks for following up! You did provide enough information in the bug report, and more detail will be provided there.
Ultimately it looks like the Enterprise Program API Key is only valid for the Enterprise Program API, and will not work with other services such as the App Store Connect API. The 'unexpected token at ' failure you've reported appears to be unrelated, but is something we're investigating.
To unblock you from submitting to Apple Notary, could you try generating an app-specific password following these instructions, and use it with notarytool, and letting us know how it goes? Please also see the 'App-specific Passwords' section in the notarytool manpage (run man notarytool
in the terminal) for more information.