1

Xcode starts encountering this error

ld: framework not found Firebase-XXXXXX

where XXXXXX would be any framework listed in the podfile, here is the specific part of that podfile

pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'FirebaseUI/Database'
pod 'Firebase/Storage'
pod 'Firebase/Messaging'

after I update the existing project's firebase frameworks (which were in 4.x.x version at the time of starting this project) to the newer 5.x.x version of firebase (for using ML-Kit) using pod install in the project directory, it fails to compile it.

Steps taken so far after going through the web,

The following is done with a backed copy of running 4.x.x version of project,

a) Tried all answers from this green ticked question

b) Cleared Xcode's Derived data for this project, cocoapods cache uninstalled/ reinstalling it entirely. Commented out firebase part in podfile and then pod install it twice (one for removing the firebase and second for installing it again)

c) Manually copying the error generating firebase dependancies to the project's folder (bad idea, 52 bugs 300+ warnings)

Help will be highly appreciated.

Frostmourne
  • 156
  • 1
  • 19
  • So what the main question? It's normal way to update a project when you try to use new framework because of some features can be inactive without this fixes. – biloshkurskyi.ss Sep 05 '18 at 13:28
  • Upon upgrade all of the mentioned frameworks in the podfile, fails to compile. As mentioned at the start of the question: `ld: framework not found Firebase-XXXXXX` – Frostmourne Sep 05 '18 at 18:11

2 Answers2

2

Add the following to the Podfile:

pod 'FirebaseAnalytics'

In Firebase 5, FirebaseAnalytics is no longer an implicit dependency of Database, Messaging, and Storage.

The Firebase docs recommend always including FirebaseAnalytics to include Analytics.

Paul Beusterien
  • 27,542
  • 6
  • 83
  • 139
  • This seems to work, but unable to get past this one: `ld: framework not found FirebaseDatabaseUI` – Frostmourne Sep 05 '18 at 18:59
  • No luck, on the side note -- had a cocoapods warning: `target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target Support Files/Pods-x/Pods-x.debug.xcconfig'. This can lead to problems with the CocoaPods installation`, cleared that and tried as you recommended still the bug persists – Frostmourne Sep 06 '18 at 05:30
0

Every Firebase dependancies has various linkages between them, even if your project doesn't need, For instance -- for this dependency: ld: framework not found FirebaseDatabaseUI was not required in the project and was taken out by these steps,

Goto

Target(project_name)-> Build Settings-> search(Other linker flags)-> from their remove the conflicting dependency

Be sure to build back and check if that dependency was even been used or not, in my case it wasn't.

Frostmourne
  • 156
  • 1
  • 19