我有一个小型概念验证应用程序,我试图在我的框架 (AequumPOCFramework.framework) 中嵌入(并签署)一个框架 (Alamofire),但是,当我尝试部署到我的设备时,它一直给我错误
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
....在使用库验证的过程中无效:映射文件没有 cdhash,完全未签名?代码必须至少是临时签名的.
....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.
如果我只是尝试部署自己的框架,而不在其中嵌入 Alamofire,那么一切正常.
If I just try to deploy my own framework, without having Alamofire embedded in it, everything works fine.
部署到我的 iphone 时的完整错误是:
The complete error at deploy to my iphone is:
dyld:库未加载:@rpath/Alamofire.framework/Alamofire引用自:/private/var/containers/Bundle/Application/EDB697EB-EA15-4301-B4B6-A8FE1F0212BE/PocIOS.app/Frameworks/AequumPOCFramework.framework/AequumPOCFramework原因:没有找到合适的图片.发现:/private/var/containers/Bundle/Application/EDB697EB-EA15-4301-B4B6-A8FE1F0212BE/PocIOS.app/Frameworks/AequumPOCFramework.framework/Frameworks/Alamofire.framework/Alamofire:代码签名在(/private/var/containers/Bundle/Application/EDB697EB-EA15-4301-B4B6-A8FE1F0212BE/PocIOS.app/Frameworks/AequumPOCFramework.framework/Frameworks/Alamofire.framework/Alamofire) 在使用库验证的过程中无效:映射文件没有 cdhash,完全未签名?代码必须至少是临时签名的.
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.
我做错了什么?
iOS 不支持嵌套框架(请参阅 技术说明).目前唯一合法的解决方案是将嵌入式"框架直接链接到托管应用程序.
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 主要是平台特定二进制文件的聚合,不幸的是与嵌入框架无关.
* XCFramework is mainly an aggregation of platform specific binaries' and has nothing to do with embedding frameworks unfortunately.
这篇关于签署嵌入式框架在 Xcode 11.2.1 中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!