Ad Hoc Code Sign Error OSX
-
I mentioned this a few weeks ago in a different thread. I haven't been able to use a commit of Develop to export a plugin from HISE since November 30th. The error I get upon export is below:
❌ error: Ad Hoc code signing is not compatible with the Hardened Runtime. Sign with a Mac Developer certificate or disable the Hardened Runtime by setting the ENABLE_HARDENED_RUNTIME build setting to NO. (in target 'DANH - App')
All the hardened runtime stuff is as it should be in the project files etc (changing any of these settings breaks everything).
I'm on Mojave on my main machine so I figured I'd upgrade my old laptop (which was on Catalina but also getting these errors) to Big Sur and hey presto, I can now export from the latest Develop. All my developer certificates are on my main machine. My laptop doesn't have any of these and I'm not logged into XCode on there. Obviously I had to upgrade XCode to v 13.2.1.
I'd rather not risk upgrading my main machine to Monterey in case other things break in the process, not to mention I lose some 32 bit plugins and a couple of hardware synths that have yet to update themselves!
I can happily codesign and notarize plugins exported from Develop 30th Nov commit. So I don't think my certificates are to blame (esp as I has the same errors on my laptop).
Any advice sincerely welcome! I'm getting left behind
-
@danh what are you using to do the codesigning?
Daves utility? or command line?
-
@lindon this is literally exporting from HISE direct, as in:
Export -> Export as Instrument (VST/AU) Plugin
So no codesigning should be happening anywhere as far as I'm concerned. I could be wrong though?
I'm not sure what's changed between 30th Nov and now...
-
@danh we talked about this recently and I got the same error, which was gone with I-don't-remeber-which commit. But afterwards I grabbed a more recent commit and the issue was back... The solution I used was to open the autogenerated projucer file and build the plugin using xcode (like when you're building HISE).
It worked fine, but I always codesign my plugins manually after compiling. -
@matt_sf Thanks, let me give this a try
-
@matt_sf sadly getting the same error
-
@danh oh I didn't mentioned it but in the projucer file you have to disable 'hardened runtime'. I should have some time soon to check the process, I'll come back with more info.
-
@matt_sf aha! let me try again
-
@matt_sf ok, success... nice thanks. so it's built the standalone. How do I make it build a vst / au?
Sorry, haven't built this way before!
-
@danh Exactly the same method for the plugin
-
@danh great! it depends on the autogenerated file. So just choose 'HISE > export as plugin'
-
-
@matt_sf are you on Mojave as well?
-
@danh nope, catalina
-
@danh said in Ad Hoc Code Sign Error OSX:
If only we could find the issue...
Probably a problem with the template generator in HISE, should be an easy fix
-
@d-healey As in it's setting the Runtime to the wrong setting?
-
@danh I can't check it now but search for the setting here :
HISE/hi_backend/backend/ProjectTemplate.cpp
HISE/hi_backend/backend/StandaloneProjectTemplate.cppI'll try to test it tonight and see if it works
-
@danh It couldn't be simpler : go into these files :
HISE/hi_backend/backend/ProjectTemplate.cpp
HISE/hi_backend/backend/StandaloneProjectTemplate.cppand search for
hardenedRuntime=\"1\"
.Change 1 to 0, recompile HISE and you're done, it's working just fine
-
AFAIK, the Hardened Runtime is a must for the notarization. So disabling it isn't a good way to go.
There should be a fix without disabling it.
-
@orange ok thanks for the info ! I'll try to notarize a plugin later to see what happens. If really this isn't the solution, we'll still be able to compile projects by loading the projucer file in xcode, so this is not a big issue.