10

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?

1
  • Have you ever found a solution? Commented Jun 25, 2018 at 20:59

3 Answers 3

5

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

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

2

in podfile, comment the use_frameworks! line

credit here.

0

Please make sure your project setting under Link Binary with Libraries as 'Optional' not as 'Required' for Pod_PROJECT-NAME.framework

enter image description here

1
  • I did, did not help unfortunately.
    – swalkner
    Commented Dec 23, 2016 at 14:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.