Search code examples
swiftcocoapodsdyldcommand-line-tool

Cocoapods: dyld library not loaded


So since a few days I have this issue: I create an empty command line project and set up Cocoapods, but then I always get this runtime error:

dyld: Library not loaded: @rpath/Alamofire.framework/Versions/A/Alamofire
Referenced from: /Users/...
  Reason: image not found
Program ended with exit code: 9

This happens regardless of the pod I want to use and also in already existing projects. Windowed Cocoa applications and iOS apps are not affected. I tried setting the pods.framework to Optional as suggested elsewhere, but this doesn't help. I tried it with the newest Cocoapods beta and the stable release and reinstalled Xcode, but without success. I noticed under Build Phases there is no 'Embed Cocoapods framework' as usual, so I tried adding that manually; didn't work either.

I've run out of ideas, so does anybody have any idea what might cause this? Otherwise I'll file a bug report. Thanks.


Solution

  • As it turns out, this behaviour is expected, as there is no easy way (for CP) to link libraries to a command line tool.