Signing embedded framework not working in Xcode 11.2.1

三世轮回 提交于 2019-12-23 08:28:13

问题


I have a small proof-of-concept app, where I am trying to embed (and sign) a framework (Alamofire) inside of my framework (AequumPOCFramework.framework), however, when I try to deploy to my device, it keeps giving me the error

....not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

If I just try to deploy my own framework, without having Alamofire embedded in it, everything works fine.

The complete error at deploy to my iphone is:

dyld: Library not loaded: @rpath/Alamofire.framework/Alamofire Referenced from: /private/var/containers/Bundle/Application/EDB697EB-EA15-4301-B4B6-A8FE1F0212BE/PocIOS.app/Frameworks/AequumPOCFramework.framework/AequumPOCFramework Reason: no suitable image found. Did find: /private/var/containers/Bundle/Application/EDB697EB-EA15-4301-B4B6-A8FE1F0212BE/PocIOS.app/Frameworks/AequumPOCFramework.framework/Frameworks/Alamofire.framework/Alamofire: code signature in (/private/var/containers/Bundle/Application/EDB697EB-EA15-4301-B4B6-A8FE1F0212BE/PocIOS.app/Frameworks/AequumPOCFramework.framework/Frameworks/Alamofire.framework/Alamofire) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.

What am I doing wrong?


回答1:


Nested frameworks are not supported on iOS (see technotes). The only legit solution at the moment is to link "embedded" frameworks directly to a hosting app.

* XCFramework is mainly an aggregation of platform specific binaries' and has nothing to do with embedding frameworks unfortunately.



来源:https://stackoverflow.com/questions/58822981/signing-embedded-framework-not-working-in-xcode-11-2-1

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!