简体   繁体   English

dyld:库未加载:@rpath/protobuf.framework/protobuf

[英]dyld: Library not loaded: @rpath/protobuf.framework/protobuf

I have created a framework and used cocoapods dependency to share the framework.我创建了一个框架并使用 cocoapods 依赖项来共享该框架。 I can able to install the framework using cocoapod Podfile and can access the public methods but at runtime I am getting the following error:我可以使用 cocoapod Podfile 安装框架,并且可以访问公共方法,但在运行时出现以下错误:

dyld: Library not loaded: @rpath/protobuf.framework/protobuf
Referenced from: /private/var/containers/Bundle/Application/EE2A1E47-21F7-4CD7-A7C3-AE7BD19A6326/VizurySwiftSample.app/Frameworks/VizuryEventLogger.framework/VizuryEventLogger
Reason: image not found

Why I am getting the following issue?为什么我收到以下问题? I have searched and tried all possible solution but none of them are working?我已经搜索并尝试了所有可能的解决方案,但没有一个有效? Please help me请帮我

From https://github.com/CocoaPods/CocoaPods/issues/9749#issuecomment-620005369 :https://github.com/CocoaPods/CocoaPods/issues/9749#issuecomment-620005369

Firebase is a static_framework CocoaPod and can only be depended upon by other statically linked pods. Firebase 是一个 static_framework CocoaPod,只能被其他静态链接的 Pod 依赖。 Add spec.static_framework = true to the podspec.spec.static_framework = true添加到 podspec。

I know!我知道! I know!我知道!

Deleting build cache helped me.删除构建缓存帮助了我。 I clicked “Product / Clean build folder” and then it magically worked!我单击“产品/清理构建文件夹”,然后它神奇地工作了! Aye aye XCode gods!啊啊啊XCode神啊!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM