i realize this requires non app store distribution.
You have that backwards:
-
The hardened runtime is required for all apps distributed independently, using Developer ID signing.
-
It’s not currently required for Mac App Store apps. However, I strongly recommend that you enable it in your Mac App Store app even though it isn’t required. It’s enables multiple security features that you really want enabled.
some third party libraries (python-related if it is important) are
causing troubles with that.
I recommend that you work with the library vendor to fix those problems. And if they can’t or won’t do that, I recommend that you reconsider those dependencies. The hardened runtime isn’t exactly new, being introduced in macOS 10.14 back in 2018.
Having said that, you can opt out of most hardened runtime security enhancements using hardened runtime exception entitlements.
IMPORTANT Don’t just enable all of these. Some of are redundant (com.apple.security.cs.disable-executable-page-protection
is a superset of com.apple.security.cs.allow-unsigned-executable-memory
is a superset of com.apple.security.cs.allow-jit
) and some of them will make your life harder down the line [1]. Work with your library vendor to determine exactly what hardened runtime exceptions you need, and apply just those.
Share and Enjoy
—
Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"
[1] Specifically, com.apple.security.cs.disable-library-validation
makes it harder to paste Gatekeeper, as discussed in Resolving Gatekeeper Problems Caused by Dangling Load Command Paths.