- Home /
Signing C++ Plugins For the Mac App Store
In porting Paint My Cat for the Mac App Store, I want our C++-based computer vision and AR tracking to work. And it does... right up until the moment I sign the app with codesign. At that moment, it stops loading our Plugin at runtime. (At least, I assume that's what happens, because I get a blank screen that looks very much like the call to that API failed completely and threw an exception.)
Can anyone explain what I need to do to get plugins working correctly with signed binaries?
OR
Is it the fact that my plugin accesses the camera? (Which I'm surprised at, because I'm signing it with the same entitlements file as the main app, which specifies use of the camera.)
I think this is a long shot for Unity Answers, but here's hoping.
Alex
PS. I should add that I've made sure the info.plist contains the same bundle information in both cases, and even overriden the bundle information with the -i flag in the codesign. Nothing seems to make the app load the executable code from the plugin after it has been signed.
Not my area of expertise, unfortunately, but have you checked the log file after starting the app to deter$$anonymous$$e whether it is in fact the call to the plugin?
Answer by ferretnt · Jan 10, 2013 at 10:22 PM
In the spirit of answering my own question, this turned out to be a very subtle dependency: My C++ plugin depended on an external library which through a chaotic chain of external build systems depended on the unix zlib as a dylib. Changing that dependency to link against Apple's zlib, which is called libz, then allowed the plugin to be loaded in sandbox mode.
For anyone else doing it, signing plugin bundles is very straightforward. I never quite worked out if you are suppose to sign the bundle, or the executable code inside its Contents/MacOS section, so I just ran codesign on both, but after that everything works.
Getting good debug output from C++ Unity plugins on a Mac is its own separate thread... I still haven't answered that one.
A.
Your answer
![](https://koobas.hobune.stream/wayback/20220613090628im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Signing C++ Plugins For the Mac App Store 0 Answers
Symbol not found: _UnityGetAudioEffectDefinitions 0 Answers
Unity 2D Camera Player Boundary 1 Answer