MacOS notarization on command line returning '

2020-07-27 03:05发布

The issue is when getting the notarization status after uploading a request

It's like this, I've got an older kernel extension, with the latest mac update notarizing it will be required and I'm trying to get this done in an automated way (command line).

First thing I wanted to do was see if I could get anything to upload and get any status back.

So after building the kext in xcode, I used ditto to create the archive that needs to be sent to apple:

cd <builddir> && ditto -c -k --keepParent "MyApp.kext" "MyApp.kext.zip"

Once that is done I upload it:

xcrun altool --notarize-app --primary-bundle-ip "com.myapp.." --username "user@example.com" --password "mypassword" -asc-provider "MyProvider" --file MyApp.kext.zip

This returns the request id that I need

So the above steps work, the next step is what's giving me issues, getting the status of the request, tried both the specific request as fetching them all

xcrun altool --notarization-info <id> -u "user@example.com" -p "mypassword" -asc-provider "MyProvider"

OR

xcrun altool --notarization-history 0 -u "user@example.com" -p "mypassword" -asc-provider "MyProvider"

The two commands both give me:

*** Error: Connection failed! Error Message - unsupported URL
*** Error: Apple Services operation failed. unsupported URL

On google I'm not having any luck on finding any error with "unsupported URL"

Does anyone have any experience with this?

1条回答
做自己的国王
2楼-- · 2020-07-27 03:29

I've seen this error before, I forget what exactly caused it, but it definitely would have been a mistake in the way I submitted the command. Unfortunately, altool does not appear to have been written with user-friendliness in mind and does not seem to do much in the way of command line validation.

With that in mind, taking a closer look at your command lines, I notice:

  • It should be --asc-provider, not -asc-provider. Two hyphens, not one.
  • The --notarization-info sub-command actually does not need the --asc-provider option as the UUID is unambiguous for identifying the notarisation transaction you're after.

Tips for anyone finding this answer after a web search for this error message:

  • Compare xcrun altool --help with your actual command. Check number of hyphens, and make sure the command you're running requires or supports the arguments you are passing.
  • Check that all strings (user name, provider, bundle IDs, password (I strongly recommend the keychain provider over providing the literal password on the command line!), etc.) are correctly escaped and surrounded by quotes for good measure.
查看更多
登录 后发表回答