9

I have scoured SO and Google but can't find an answer that works. I have used the new Firebase Cocoapod on multiple projects but now, when adding it to a different project I am getting the following error.

enter image description here

I am using Xcode 7.3.1 with cocoapods 1.0.1.

Here is my podfile: enter image description here

Any help is greatly appreciated!

David East
  • 31,526
  • 6
  • 67
  • 82
  • Have you tried cleaning the build directory (hold down option when selecting Product > Clean)? If this project was using older cocoapods as well, it might be worth doing `pod deintegrate` then `pod update` as well. – Ian Barber Jun 03 '16 at 04:35
  • @IanBarber I tried `pod deintegrate` and cleaning the project with no luck. In the end I got the project to build by downloading the SDK and manually adding the frameworks to the project. I'm just curious if you know why this works instead of cocoapods? It's a relatively old project that has been on the App Store for over a year. Maybe there is something deep down in the build settings doesn't play well with the new cocoapods? Anyway, thanks for your help! – Samuel Rosenstein Jun 03 '16 at 12:41
  • did you find a solution to this issue? Stuck on this... – Jason Jun 27 '16 at 01:55
  • I don't remember exactly, off the time of my head I think I had to just repull it from the repo and take the losses. Try to save whatever you have done and try to integrate it with a clean version from the repo and then add Firebase. – Samuel Rosenstein Jun 27 '16 at 17:04
  • did you find a solution to this issue?For me to same problem please help me if you solved this? – vijay Jan 05 '17 at 07:34

2 Answers2

21

Go to Build Settings > Other Linker Flags > on a new line $(inherited).

Do a Cmd+Ctrl+K for a clean, and then build.

David East
  • 31,526
  • 6
  • 67
  • 82
  • i didnt get it. what new line? what about debug, release sub items. can you add screenshot just to be clear? Thank you! – Vitaliy A Jan 08 '18 at 08:32
  • 2
    Unfortunately, this doesn't seem to work anymore (Xcode beta 9.3), and CocoaPods puts $(inherited) in by default. Still trying to figure out a solution for 2018 – Max Mar 27 '18 at 20:54
  • 1
    @Max not working for me either, adding manually frameworks to the projects solved my problem – kaplya Mar 29 '18 at 07:41
  • I got it to work by changing the dependency from `Firebase/Messaging` to `FirebaseMessaging` – Max Mar 30 '18 at 20:29
  • @Max Which "dependency"? Won't work for me either. But what did you do specifically? – Alyoshak Apr 13 '18 at 19:58
  • Worked for me this morning in Xcode 10.1. CocoaPids didn't put $(inherited) in by default in my situation. – u2Fan Feb 13 '19 at 14:50
0

Uncomment this line to define a global platform for your project

platform :ios, '9.0'

target 'AppName' do # Comment this line if you're not using Swift and don't want to use dynamic frameworks inhibit_all_warnings! use_frameworks!

Pods for FCM

pod 'Firebase' pod 'Firebase/Core' pod 'Firebase/Messaging'

end

vijay
  • 1,475
  • 2
  • 16
  • 26