Using notarytool on an older version of macOS

According to this helpful article, I should be able to extract notarytool for use on macOS 10.15 and later.

I've extracted notarytool and put it in a common location for use with a script that builds, signs, and notarizes plugin installers. The script previously relied on altool. The initial call to notarytool is: xcrun <path to notarytool> submit --apple-id <our id> --password <our password> --team-id <our ID> --wait <path to file>

This works fine on a machine running macOS 13.5.1, with Xcode 14.3 installed. The installers get built and notarized. However, on a machine running macOS 11.4, with Xcode 12 installed, I get this error:

xcrun: error: unable execute utility <path to notarytool> because it requires a newer version of macOS.

OK, I tried removing the initial xcrun command, and now I get this error:

dyld: Library not loaded: /usr/lib/swift/libswift_Concurrency.dylib
Referenced from: <path to notarytool>
Reason: image not found

The article linked above makes it sound like notarytool should work as a standalone tool from any machine running macOS 10.15 or higher. Is the existing Xcode installation interfering? Is there an OS/Xcode version agnostic way to run notarytool?

Accepted Reply

I think you need to extract notarytool from Xcode 13. I ran otool -L on the copy of notarytool in Xcode 15 and saw that it depends on /usr/lib/swift/libswift_Concurrency.dylib. But doing otool -L on the notarytool in Xcode 13.4.1 does not show that dependency.

Replies

I think you need to extract notarytool from Xcode 13. I ran otool -L on the copy of notarytool in Xcode 15 and saw that it depends on /usr/lib/swift/libswift_Concurrency.dylib. But doing otool -L on the notarytool in Xcode 13.4.1 does not show that dependency.

Thanks, that did it! I extracted notarytool from Xcode CL Tools 13.4.1 and called it directly (without xcrun), and it notarized successfully both machines. Incidentally, I noticed that this notarytool binary is a bit bigger, about 50MB instead of about 20MB.