5

I am trying to add FirebaseUI/Storage pod to iOS App which is throwing the following linker error:

framework not found SDWebImage for architecture x86_64

I have tried adding SDWebImage independently and it works but as soon as I add FirebaseUI/Storage pod, it throws the above error.

Any ideas what could be causing this?

This is what my Podfile looks like:

target 'myApp' do

pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Storage'

pod 'FirebaseUI/Storage'

pod 'SDWebImage'
pod 'MMDrawerController'

end
Vibhor Goyal
  • 2,405
  • 2
  • 22
  • 35
  • Mind sharing some more information (Podfile, `pod install` output, version numbers, etc.)? – Mike McDonald Dec 03 '16 at 21:59
  • You shouldn't need the second `SDWebImage` as it should be pulled in automatically from `FirebaseUI/Storage`. What version of CocoaPods are you using? Also, is this Obj-C or Swift? Do you have `use_frameworks!` if you need it (are using Swift). – Mike McDonald Dec 05 '16 at 00:09
  • I am using the latest version of CocoaPods. This is Obj-C. – Vibhor Goyal Dec 05 '16 at 06:53

2 Answers2

6

I had this exact same problem. I seem to have fixed it by changing my pod file to...

target 'MyApp' do
  # Uncomment this line if you're using Swift or would like to use dynamic frameworks
  use_frameworks!

  # Pods for MyApp
  pod 'SDWebImage', '~>3.8'
  # pod 'Firebase/Core'
  pod 'FirebaseUI', '~> 1.0'

  target 'MyAppTests' do
    inherit! :search_paths
    # Pods for testing
  end

  target 'MyAppUITests' do
    inherit! :search_paths
    # Pods for testing
  end

end

A few things to note:

  1. I turned on use_frameworks even though I am using Objective C
  2. I turned off my Firebase pod calls - they are pulled in automatically by FirebaseUI
aryland
  • 133
  • 1
  • 8
  • 1
    This seems to be an issue in CocoaPods. SDWebImage is correctly included if you omit `use_frameworks!`, but pods adds linker flags that then expect SDWebImage to be present in framework form. See https://github.com/firebase/FirebaseUI-iOS/issues/194 – Morgan Chen Dec 05 '16 at 18:08
  • 2
    You saved my day. It works if you uncomment 'use_frameworks!' – superpuccio Jan 25 '17 at 14:50
0

Seems like there is no clear documentation regarding which pods to include to enable just the FirebaseUI/Storage functionality if also including other individual Firebase/... pods.

I needed to remove all pods and install them back without FirebaseUI/Storage since it duped several classes which were not removed once I removed the [FirebaseUI/Storage] pod.