Swift dyld: library not loaded - using CocoaPods

I apologize for what may seem like an overly asked question, but no matter how many answers to related questions I ask, none of them seem to work. See (OK) here , here , here and here .

I am running Xcode 6.4 with iOS 8 (iPhone only) using CocoaPods. Many other answers provided, it seems there is a build setting or general settings that are not in my version of Xcode, which gives a lot of conclusions that do not help.

As a reference, I followed This CocoaPods Tutorial , which worked with ease. But only when I try to download the application on my phone (yes, I have valid certificates, and my other applications work fine, without using other dependencies), the application immediately crashes, like the load.

dyld: Library not loaded: @rpath/Pods_ExamplePods.framework/Pods_ExamplePods Referenced from: /private/var/mobile/Containers/Bundle/Application/F109A377-3EA4-48C2-9042-CB6C384C9F30/ExamplePods.app/ExamplePods Reason: image not found (lldb) 

See here where I called my application "ExamplePods"

enter image description here

And here is my folder structure, open in workspace mode. Please note that there are only 3 dependencies.

enter image description here

Then see “General Settings” and “Build Settings”

enter image description here

enter image description here

I have a complete loss, help is greatly appreciated!

+7
ios iphone xcode swift cocoapods
source share
3 answers

I see you are also getting a warning. Does this warn something like that?

ld: warning: -weak_framework is treated as -framework when used with -bitcode_bundle (Xcode setting ENABLE_BITCODE = YES). Weak communication may still occur depending on the presence of markup in the headers.

If so, you should try to keep the frame loosely coupled and disable the bitcode ..

Found this screen shot here.

If this does not work, try disabling everything that you did not compile with. Check for package updates, etc.

+2
source share

This is a known issue with cocoa pods. See https://github.com/CocoaPods/CocoaPods/issues/3903

You can either lower cocoa pods. Or using the methods mentioned in this post: completely remove the "compatibility version", leave it blank. A simple script can be added to the Podfile to automate this:

 post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| config.build_settings['DYLIB_COMPATIBILITY_VERSION'] = '' end end end 

Then clean the project and run pod install.

0
source share

I had the same problem and the solution was decided to solve.

In related structures and libraries (in the build phases), mark Pods.framework as Optional instead of what is required.

-one
source share

All Articles