Xcode 12 notarization failed Hardened Runtime is not enabled

I am building a macOS app that is using a framework that I have written in the following way:

Let's take for example the architecture:
  1. test.app (it is a macOS app, that has entitlements enabled, and after code signing, everything works as expected.

  2. Into test.app, on build action, I am copying under SharedSupport the framework that I have locally built. This one I am signing as well.

The problem appears in 2. The local framework has a reference to the build files of a .net project. I tried to add capabilities under Signing & Capabilities, but Xcode says that this project doesn't support capabilities and the list with capabilities is of course empty.

Next, I tried adding a .entitlements file to this framework project and code-signing it with the runtime as options plus providing the entitlements file.

I have the same settings under the .app project and there everything works fine.

Unfortunately, after all, steps are taken, when I try to notarize the app it says that the project referenced from the framework(step 2) has no hardened runtime enabled.

I am receiving the following output from notarization:
Code Block
{
"severity": "error",
"code": null,
"path": "test.pkg/sample.pkg Contents/Payload/Applications/test.app/Contents/SharedSupport/Addin/Default/sometest.framework/Versions/A/Resources/folder-to-net-framework-bin/test-net",
"message": "The executable does not have the hardened runtime enabled.",
"docUrl": null,
"architecture": "x86_64"
},


Answered by Etresoft in 654648022
Argg!! I forgot about the mark down.

The tool is "install_name_tool"
You can't put code in a Resources folder. 3rd party umbrella frameworks are also not supported. The .net framework will need to be a sibling framework. Since you are doing this manually, you may also need to manually adjust the paths of your framework using "installnametool" so that it can find the sibling framework.
Accepted Answer
Argg!! I forgot about the mark down.

The tool is "install_name_tool"
Xcode 12 notarization failed Hardened Runtime is not enabled
 
 
Q