简体   繁体   中英

dyld: Library not loaded: @rpath/protobuf.framework/protobuf

I have created a framework and used cocoapods dependency to share the framework. 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:

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 :

Firebase is a static_framework CocoaPod and can only be depended upon by other statically linked pods. Add spec.static_framework = true to the 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!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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