Codesigning for notarization

Hello there,

I was having trouble with codesigning for apple notarization using the in-built codesigning cmake commands.

Unfortunately a manual post build command didn’t do the trick, because xcode would automatically sign the builds with a local machine signature after my post build command. (That might be an issue on it’s own.)

Anyway, I think it would be handy to use the in-built tools to codesign for notarization properly.
As of now, the cmake macro smtg_codesign_target() in /vst3sdk/cmake/modules/SMTG_CodeSign.cmake doesn’t support the neccessary timestamp flag and the ability to switch to manual signing.

I was succesful in notarizing my plugin by altering SMTG_CODESIGN_ATTRIBUTES in the macro like this:

set( SMTG_CODESIGN_ATTRIBUTES 
    XCODE_ATTRIBUTE_DEVELOPMENT_TEAM    ${team}
    XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY  "${identity}"
    XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "--timestamp -f"
    XCODE_ATTRIBUTE_CODE_SIGN_STYLE "Manual"
   )

Is there a way to manually set the neccessary attributes XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS and XCODE_ATTRIBUTE_CODE_SIGN_STYLE without altering the VST3SDK macros?

1 Like

It is actually quite straight forward. I used this in my projekts cmake list to deactivate the VST3SDK codesign macro and use the xcode standard attributes:

set(SMTG_DISABLE_CODE_SIGNING ON)
set(XCODE_ATTRIBUTE_DEVELOPMENT_TEAM    "my team")
set(XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY  "my identity" )
set(XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS "--timestamp -f")
set(XCODE_ATTRIBUTE_CODE_SIGN_STYLE "Manual")
1 Like

Good catch. We did not thought about the notarization use case (as we use installers to distribute our software to our users). We will add this as an option in a future update.

1 Like