Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 202
Chowdhury Md Rajib Sarwar Avatar asked Sep 03 '25 06:09

Chowdhury Md Rajib Sarwar


2 Answers

I know! I know!

Deleting build cache helped me. I clicked “Product / Clean build folder” and then it magically worked! Aye aye XCode gods!

like image 116
Kirill Groshkov Avatar answered Sep 04 '25 23:09

Kirill Groshkov


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.

like image 34
Paul Beusterien Avatar answered Sep 04 '25 23:09

Paul Beusterien