Alttool Manual Notarisation of App - The operation couldn’t be completed. Is a directory Is a directory (21)

I'm having issues with notarizing the app directly in Xcode.Even though i have acceped all agreements and updated the required banking info,the upload step get stuck at authenticating with Apple Service.So i'm trying to use alttool to notarize my app.

  • Generated App specific password
  • Using the following command

But i keep getting the error

my-MacBook-Pro:1.3 my$ xcrun altool --notarize-app --primary-bundle-id "me.myapp" --username me@live.com --password mypass  --file "myapp.app"
*** Error: Notarization failed for 'myapp.app'.
*** Error: The operation couldn’t be completed. Is a directory Is a directory (21)
 {
    "_kCFStreamErrorCodeKey" = 21;
    "_kCFStreamErrorDomainKey" = 1;
}

I'm running Xcode 13.1 on macOS Monterey 12.0.1

You can’t notarise a .app directly. The notary service only accepts files, and specifically zip archives (.zip), installer packages (.pkg), and disk images (.dmg).

For info on how to package your app for distribution, see Signing a Mac Product For Distribution.

Also, please don’t use the altool. It has been deprecated, at least for notarisation work, in favour of notarytool, which is nicer, faster, and more reliable. See WWDC 2021 Session 10261 Faster and simpler notarization for Mac apps.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Alttool Manual Notarisation of App - The operation couldn’t be completed. Is a directory Is a directory (21)
 
 
Q