9

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

I'm running Xcode 6.4 with iOS 8 (iPhone only), using CocoaPods. Many of other answers provided, there seems to be a build setting, or general setting that does not exist in my version of Xcode, yielding many conclusions not helpful.

As a matter of reference, I followed This CocoaPods Tutorial which worked with ease. But it's only when I attempt to load the app onto my phone (yes, I have valid certificates, and my other apps work just fine without using other dependencies), the app immediately crashes just as it's about to 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 named my app "ExamplePods"

enter image description here

And then here is my Folder Structure, opened in Workspace mode. Note that there's only 3 dependencies.

enter image description here

Then see "General Settings" and "Build Settings"

enter image description here

enter image description here

I'm at a complete loss, help is much appreciated!

Community
  • 1
  • 1
ded
  • 1,330
  • 1
  • 12
  • 21

4 Answers4

1

I see you're also getting a warning. Is the warning something like this?

ld: warning: -weak_framework is treated as -framework when used with -bitcode_bundle (Xcode setting ENABLE_BITCODE=YES). Weak linking may still happen based on availability mark-up in headers

If so you should try to keep the framework weak linked and disable bitcode..

Found this screenshot here.

If that doesn't work try disabling anything else you didn't compile with. Checking for pods update etc.

Edison
  • 11,881
  • 5
  • 42
  • 50
1

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

You can either downgrade cocoa pods. Or using the methods mentioned the that post: delete "Compatibility version" completely, leave it empty. A simple script can be added to 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 your project and run pod install.

JDG
  • 540
  • 1
  • 5
  • 16
  • That looks like a different issue - that's a fix for an incompatible library version, and this is about a missing binary image. – Rich Lowenberg Sep 15 '15 at 18:33
0

I had the same problem. In my case, I embed frameworks and also use CocoaPods.

The following steps fixes it for me:

  1. Go to Target's Build Phases
  2. Move the "Embed Frameworks" phase below "[CP] Embed Pods Frameworks" and "[CP] Copy Pods Resources" phases.

Hope it helps others who come across this problem.

Victor Kwok
  • 622
  • 6
  • 19
-1

I had the same problem and following solution solved it.

In Linked Frameworks and Libraries (in Build Phases), mark Pods.framework to Optional instead of required.

Maheen Khalid
  • 424
  • 5
  • 5