Hi, I have an app built in Unity that I am trying to sign an notarize for distribution. I can successfully codesign the app and it runs properly. But after successfully notarizing the app, the app stops opening.
My process is as follows:
# codesign the app. omitting "--deep" "--option runtime" or both will result in notarization failing
codesign --force --deep --verify --verbose --option runtime --sign "Developer ID Application: ORG NAME (ZZZZZZZZZ)" path/to/app.app
# create notarization submission zip
/usr/bin/ditto -c -k --keepParent path/to/app.app path/to/app.zip
# submit for notarization
xcrun notarytool submit --wait path/to/app.zip -v --apple-id apple@id.com --password "aaaa-aaaa-aaaa-aaaa" --team-id "ZZZZZZZZZ"
Notarization seems to succeed. Running:
spctl -a -vvv -t install path/to/app.app
-returns:
path/to/app.app: accepted
source=Notarized Developer ID
origin=Developer ID Application: JOHN DOE (ZZZZZZZZZ)
The Problem:
- Before code signature, the app runs normally
- After code signature, the app runs normally
- After notarization, the app hangs indefinitely on opening. It stays in the Dock until force quit. The app does not create its main window. There are no Gatekeeper warnings or pop-up windows.
Additional Information:
The second time I attempt to open the application I get a pop-up warning me that the app was force-quit while opening windows.
This happens whether or not I have used xcrun stapler to staple the notarization to the app
This happens whether I run the app from the terminal, by double clicking on the .app package, or by running the Unix Executable within Contents/MacOS/
Any idea how I can debug this and figure out what's going wrong? Any help would be greatly appreciated.