CocoaLumberjackSwift + Carthage - "dyld: Library not loaded"

Created on 5 Apr 2016  Â·  7Comments  Â·  Source: CocoaLumberjack/CocoaLumberjack

The project complies. When I run my app, I get a crash with this message printed to the console:

dyld: Library not loaded: @rpath/CocoaLumberjack.framework/CocoaLumberjack
Referenced from: [...]/Frameworks/CocoaLumberjackSwift.framework/CocoaLumberjackSwift
Reason: image not found

More Info: I am trying to use the CocoaLumberjackSwift framework in my project. I have used Carthage to build version 2.2.0 of the framework. The project has a run script per the Carthage documentation. The framework is listed in the target's "Linked Frameworks and Libraries".

Discussion

Most helpful comment

I created a project from scratch and got it working without embedding the framework. In this configuration I have to include both the CocoaLumberjack.framework and CocoaLumberjackSwift.framework files in the carthage copy-frameworks run script.

All 7 comments

Please search first.

Thanks for the thought @rivera-ernesto, but I have searched for solutions and tried many as well. As for the linked search, none of these results are relevant outside of the title.

Would it be helpful if I enumerate all of the solutions I have pursued along with their sources?

Maybe you have a bad mix of compiled binaries and (Xcode 7.3?).

Check this other search and https://github.com/CocoaLumberjack/CocoaLumberjack/issues/608#issuecomment-200527945.

I think we need some proper notes in the README.

@rivera-ernesto: It is working now, though I am not sure if my configuration is as intended. I have a Copy files phase that copies CocoaLumberjackSwift.framework. I also have a run script that takes CocoaLumberjack.framework as input (rather than CocoaLumberjackSwift.framework). The Swift framework appears in both "Embedded Binaries" and "Linked Frameworks and Libraries".

Thank you for your help.

I may be wrong, but I think there is no need to embed the library. Linking should be enough.

I created a project from scratch and got it working without embedding the framework. In this configuration I have to include both the CocoaLumberjack.framework and CocoaLumberjackSwift.framework files in the carthage copy-frameworks run script.

I had to do the same thing. Seems like the instructions in the readme should be updated to mention that while linking with just CocoaLumberjackSwift is sufficient, you have to copy both frameworks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ivulyov90 picture ivulyov90  Â·  6Comments

tristanseifert picture tristanseifert  Â·  5Comments

minglini picture minglini  Â·  4Comments

dpbataller picture dpbataller  Â·  9Comments

Eddpt picture Eddpt  Â·  8Comments