Reputation: 449
I have created a Mac application and now I wish to distribute it. However, no matter what I do whenever I try to install the application it says Apple could not verify “<application_name>” is free of malware that may harm your Mac or compromise your privacy.
I followed the instructions from Apple developer Forum
nuitka
codesign --deep --force --verify --verbose --sign "Developer ID Application: <developer id>" \
--entitlements entitlements.plist --options runtime "<application>.app"
codesign --verify --verbose "<application>.app"
<application>.app: valid on disk
<application>.app: satisfies its Designated Requirement
/usr/bin/ditto -c -k --sequesterRsrc --keepParent <application>.app <application>.zip
xcrun notarytool submit <application>.zip --keychain-profile "key_chain_notarization_profile" --wait
accepted
. I then staple the notarization ticket to the app.xcrun stapler staple "<application>.app"
spctl -a -vvv -t install <application>.app
<application.app>: accepted
source=Notarized Developer ID
origin=Developer ID Application: <developer_id>
dmgbuild
and then signed the dmg as well.verification failed
. I tried checking the notarization status of this dmg(using spctl) and it was ok.Stackoverflow post suggested signing the app, notarizing it, preparing the dmg out of it, then signing the dmg and getting it notarized. I tried this but no luck.
My settings have Allow applications from app store and verified developers
checked.
I also checked the logs of my accepted notarization. It says accepted but the logs say that there were some warnings like
{
"severity": "warning",
"code": null,
"path": "<application>.dmg/<application>.app/Contents/MacOS/mediapipe/modules/face_detection/face_detection_short_range.tflite",
"message": "The archive at <application>.dmg/<application>.app/Contents/MacOS/mediapipe/modules/face_detection/face_detection_short_range.tflite could not be unpacked. Any executables contained in the archive will not be notarized.",
"docUrl": null,
"architecture": null
},
Can these warnings be causing the issue?
I am running a M2 Mac Air with mac os version 15.0.
Any help is highly appreciated.
Upvotes: 1
Views: 3293
Reputation: 449
If it helps anyone, the steps worked for me. After restarting my laptop, everything functioned as expected. I also read on some Apple developer forums that Gatekeeper caches results, so it could have been related to that. Either way, since the restart, it has worked perfectly every time. Just to recap, here are all the steps I followed:
Upvotes: 1