I want to notarize my app and while notarizing I have received package invalid status for this "message": "The executable does not have the hardened runtime enabled.",
I am building the application in highsierra and Xcode 9.4.
I tried adding --options=runtime while code signing, but did not help to resolve the error.
Use codesign
. It has a --options=runtime
flag.
https://developer.apple.com/documentation/security/notarizing_your_app_before_distribution/resolving_common_notarization_issues
the codesign option runtime means "make the signature compliant with a binary built withe hardened runtime". But your error message means that the binary was built without the hardened runtime enabled. Building code and signing it are two different things - you can't retroactively build when signing.
You need to either use the + button on the left of the Signing & Capabilities tab to add the Hardened Runtime option, or if you're doing everything manually, go into the build settings and set ENABLE_HARDENED_RUNTIME
to YES
.
When you verify the signature of your app, using:
codesign --display --verbose <path-to-app>
Look for the line beginning "codedirectory" and ensure that one of the flags listed is "runtime".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With