Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cocoapods + Command Line Tool - dyld: Library not loaded: @rpath/Realm.framework/Versions/A/Realm

I created a Command Line Tool project in Xcode 8.2.1, then I ran pod init and added RealmSwift to it. After pod install, I opened the .xcworkspace file.

The project compiles fine, but at runtime I get the following error:

dyld: Library not loaded: @rpath/Realm.framework/Versions/A/Realm
Referenced from: /Users/myuser/Library/Developer/Xcode/DerivedData/myproject-eqotetgxsfjvxjfevywenvddnfdm/Build/Products/Debug/myproject
Reason: image not found
Program ended with exit code: 9

How can I use cocoapods here?

like image 763
swalkner Avatar asked Dec 21 '16 08:12

swalkner


2 Answers

in podfile, comment the use_frameworks! line

credit here.

like image 103
Seunghun Yang Avatar answered Nov 09 '22 18:11

Seunghun Yang


https://github.com/CocoaPods/CocoaPods/issues/3707

In other words cocoa pods don't work with "Command Line Tool" projects.

like image 5
Gargo Avatar answered Nov 09 '22 18:11

Gargo