I've been trying to get this SDK
installed into my iOS project without much success.
At first, I tried to install it manually, using the setup instructions from here: https://firebase.google.com/docs/ios/setup#initialize_firebase_in_your_app
However, after following the readme
file exactly, when I try use this code:
[FIRApp configure];
After importing Firebase.h
into the header file, it doesn't recognise the FIRApp
and the reason seems to me missing files from the framework as FIRApp.h
doesn't exist in the headers.
So, I resorted to the much-hated, Cocoapods
installation. Everything installs fine and no warnings show during the pod install
part. However, again, when I add the following code: [FIRApp configure];
I am present with a different error:
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_FIRApp", referenced from: objc-class-ref in AppDelegate.o
For the life of me, I cannot figure this out. I have searched Google and SO with various solutions that haven't helped.
I would like to get it working with Cocoapods as I have done all the leg work with getting it installed now.
Im fan of carthage but firebase is only by manual or cocoapods, so I used cocoapods, I just fixed this by setting Other Linker Flag
property to $(inherited)
.
First, try pod update
command on your project root directory. If you see a warning there similar to target overrides the OTHER_LDFLAGS build setting defined in ...
, check your Target's Build Settings. You'll find a Other Linker Flag
property there. Set its value as $(inherited)
.
This solved the problem for me.
Uninstall firebase related pods
#pod 'Firebase/Core
#pod 'Firebase/RemoteConfig'
Then
pod install
Reinstall pods
pod 'Firebase/Core'
pod 'Firebase/RemoteConfig'
then
pod install
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With