/usr/libexec/PlistBuddy -c "Add :com.apple.security.get-task-allow bool true" /tmp/my-app-debug-entitlements.plist
/usr/libexec/PlistBuddy -c "Add :com.apple.security.cs.disable-library-validation bool true" /tmp/my-app-debug-entitlements.plist
codesign --timestamp --options runtime --sign "Developer ID Application: *** (***)" --entitlements /tmp/my-app-debug-entitlements.plist --force /path/to/my-debug-binary
I had no problems with the notarization process of the binary I signed this way.
As you said, I will not distribute my application in this way. I will only distribute this binary to users I want to debug. Thanks.
Topic:
Code Signing
SubTopic:
Entitlements