Open bylowerik opened 2 years ago
I cannot answer that question sadly. I don't know enough about the macOS launch daemon to know specifics, but I'd assume that the packaged app is somehow treated differently and requires notarization or at least signing of the executable. When running binaries by invoking them from command line they are usually spawned from the terminal process, thus running a standalone executable might work from command line as long as the executable is not enclosed in a .app container. But the error is as you said definitely tied to signing, which you also could check via the console.app application for more details.
I have tweaked the CMakeLists.txt from the example in order to link to OpenCV. This seems to work for ios and mac. I can run the toy code on the simulator.
An issue though is that if I build with
-DCMAKE_INSTALL_PREFIX=../mac-lib
and-DPLATFORM=MAC_ARM64
, then I cannot run the executable under./mac-lib/Test.App/Contents/MacOS/TestApp
. But I can run./build/Release/Contents/MacOS/TestApp
.When I run from
mac-lib
I get:The
CMakeLists.txt
is looking like this (I have added OpenCV on different places and the project name):The error says it is related to code signing, but why would that not apply to the executable in the build library?