Notarization Issue for OpenCV and OpenGL- Code Signing "A" failed

I built a framework using opencv and opengl and used it in one of my MAC OSX apps. App runs correctly but when I try to build package after archiving, getting errors

2022-03-25 11:32:00 +0000  [OPTIONAL] Didn't find info dictionary for <DVTFilePath:0x7ff46f5faba0:'/path of the framework/libglfw.3.dylib'>: Error Domain=DVTFoundationNSBundleAdditionsErrorDomain Code=1 "Couldn't load Info dictionary for <DVTFilePath:0x7ff46f5faba0:'/path of the framework/libglfw.3.dylib'>" UserInfo={NSLocalizedDescription=Couldn't load Info dictionary for <DVTFilePath:0x7ff46f5faba0:'/path of the framework/libglfw.3.dylib'>}

Here’s what I have done step by step:

I made a framework for MacOS that includes a few OpenCV and OpenGL(GLEW,GLFW) standard operations and built the dynamic libraries of OpenCV, GLEW and GLFW with the below commands.

cmake -G "Unix Makefiles" .. make -j8

Added the dylibs (libopencv_core.3.4.dylib, libopencv_imgcore.3.4.dylib), and necessary frameworks in the Framework and Libraries section.

I want to use the framework in one of my apps.

Added the built framework to one of my projects. In the Framework and Libraries section I have selected the Embed and Sign option for my dynamic framework. Tried to build the project with Hardened Runtime capability enabled. We have codesigned the dylibs using the below command : codesign --force --timestamp --sign

Also check the validation by the below command : codesign -vvvv

Validation was successful.

Then started package building. For this first archived the app. Then when I tried to notarize the archive, it failed.

Sharing the log :

2022-03-25 11:32:00 +0000  [OPTIONAL] Didn't find info dictionary for <DVTFilePath:0x7ff46f5faba0:'/path of the framework/libglfw.3.dylib'>: Error Domain=DVTFoundationNSBundleAdditionsErrorDomain Code=1 "Couldn't load Info dictionary for <DVTFilePath:0x7ff46f5faba0:'/path of the framework/libglfw.3.dylib'>" UserInfo={NSLocalizedDescription=Couldn't load Info dictionary for <DVTFilePath:0x7ff46f5faba0:'/path of the framework/libglfw.3.dylib'>}
2022-03-25 11:32:00 +0000  [OPTIONAL] Didn't find info dictionary for <DVTFilePath:0x7ff472323d10:'/path of the framework/libopencv_imgcodecs.3.4.dylib'>: Error Domain=DVTFoundationNSBundleAdditionsErrorDomain Code=1 "Couldn't load Info dictionary for <DVTFilePath:0x7ff472323d10:'/path of the framework/libopencv_imgcodecs.3.4.dylib'>" UserInfo={NSLocalizedDescription=Couldn't load Info dictionary for <DVTFilePath:0x7ff472323d10:'/path of the framework/libopencv_imgcodecs.3.4.dylib'>}
2022-03-25 11:32:00 +0000  [OPTIONAL] Didn't find info dictionary for <DVTFilePath:0x7ff4725b10c0:'/path of the framework/libopencv_imgproc.3.4.dylib'>: Error Domain=DVTFoundationNSBundleAdditionsErrorDomain Code=1 "Couldn't load Info dictionary for <DVTFilePath:0x7ff4725b10c0:'/path of the framework/libopencv_imgproc.3.4.dylib'>" UserInfo={NSLocalizedDescription=Couldn't load Info dictionary for <DVTFilePath:0x7ff4725b10c0:'/path of the framework/libopencv_imgproc.3.4.dylib'>}
2022-03-25 11:32:00 +0000  [OPTIONAL] Didn't find info dictionary for <DVTFilePath:0x7ff46f5fd890:'/path of the framework/libopencv_core.3.4.dylib'>: Error Domain=DVTFoundationNSBundleAdditionsErrorDomain Code=1 "Couldn't load Info dictionary for <DVTFilePath:0x7ff46f5fd890:'/path of the framework/libopencv_core.3.4.dylib'>" UserInfo={NSLocalizedDescription=Couldn't load Info dictionary for <DVTFilePath:0x7ff46f5fd890:'/path of the framework/libopencv_core.3.4.dylib'>}
2022-03-25 11:32:00 +0000  [OPTIONAL] Didn't find info dictionary for <DVTFilePath:0x7ff46f5fc210:'/path of the framework/libglew-shared.2.2.0.dylib'>: Error Domain=DVTFoundationNSBundleAdditionsErrorDomain Code=1 "Couldn't load Info dictionary for <DVTFilePath:0x7ff46f5fc210:'/path of the framework/libglew-shared.2.2.0.dylib'>" UserInfo={NSLocalizedDescription=Couldn't load Info dictionary for <DVTFilePath:0x7ff46f5fc210:'/path of the framework/libglew-shared.2.2.0.dylib'>}

So the archive is not getting notarized. Didn’t get what I am doing wrong. Can any of you please help me to resolve this issue?

I recommend that you try to separate this issue into two parts:

  • Stuff related to OpenCV and friends

  • Stuff related to your framework and app packaging

To do this, create an dummy Xcode project with three targets:

  • The main app

  • A framework target

  • A shared library target (to stand in for OpenCV and friends)

And then set things up to embed the shared library in the framework and the framework in the app.

If you do this, are you able to build your app into an Xcode archive and then notarise your archive?

Note To speed up your tests, chose Distribute App > Developer ID > Export. That should flush out any code signing problems. Once that works, uploading for notarisation should also work.

IMPORTANT When setting this up, make sure to set Skip Install appropriately. See TN3110 Resolving generic Xcode archive issue.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Notarization Issue for OpenCV and OpenGL- Code Signing "A" failed
 
 
Q