After adding Chromium Embedded Framework, code signing fails

I am creating a simple Cocoa Objective-C project to experiment with CEF (Chromium Embedded Framework). I copied the file "Chromium Embedded Framework.framework" into my project, adding it as an embedded binary, for example:

enter image description here

Since then, my compilation has not worked while signing the code with this error:

CodeSign /Users/pupeno/Library/Developer/Xcode/DerivedData/cefobjc-bxtruyemnyagwwgdejtzuxngovsr/Build/Products/Debug/cefobjc.app/Contents/Frameworks/Chromium\ Embedded\ Framework.framework/Versions/A cd /Users/pupeno/Projects/macninja-demos/cefobjc export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate Signing Identity: "-" /usr/bin/codesign --force --sign - --preserve-metadata=identifier,entitlements,resource-rules /Users/pupeno/Library/Developer/Xcode/DerivedData/cefobjc-bxtruyemnyagwwgdejtzuxngovsr/Build/Products/Debug/cefobjc.app/Contents/Frameworks/Chromium\ Embedded\ Framework.framework/Versions/A Warning: usage of --preserve-metadata with option "resource-rules" (deprecated in Mac OS X >= 10.10)! /Users/pupeno/Library/Developer/Xcode/DerivedData/cefobjc-bxtruyemnyagwwgdejtzuxngovsr/Build/Products/Debug/cefobjc.app/Contents/Frameworks/Chromium Embedded Framework.framework/Versions/A: No such file or directory Command /usr/bin/codesign failed with exit code 1 

enter image description here

Any ideas why this is happening or how to fix it?

+5
source share
1 answer

The structure is a hierarchical directory with different versions in Cocoa, you must create the main version for the framework in order to ensure the correct subscription to the framework. As we know, the CEF structure has a structure that is incompatible with the sign mechanism and different from the expected structure. Therefore, we need to modify it as follows: A hierarchical directory cocoa framework

In addition, you need to sign the lib or plugs contained in the framework, respectively, we may code this way ...

codesign -s "$ {CODE_SIGN_IDENTITY}" -f "$ {PLUGIN_PATH}"

0
source

Source: https://habr.com/ru/post/1214265/


All Articles