Firebase error even if I don't use it - ios

In my objective-c application, I added Google Analytics using Pods (this is how I add it: pod 'Google/Analytics'). In the Pods folder, I found those Firebase packages FirebaseAnalytics, FirebaseCore and the FirebaseInstanceId). When I run my application, sometimes it crash and this is what I'm getting in the console:
[Firebase/Core][I-COR000003] The default Firebase app has not
yet been configured. Add [FIRApp configure] to your application
initialization.
I don't call the Firebase classes anymore and I don't want to use them.
Why am I having Firebase even if I didn't add them? Why am I having this error? How can I resolve this? If I delete the packages will that cause a problem?

Google Analytics is not recommended anymore for mobile applications:
The Firebase SDK is the recommended method to track iOS apps.
And AFAIK, the development of the features + pod maintenance is not a priority as they fully shifted towards Firebase.
I know some legacy code has to remain on GA because of outstanding history of logs. But if you have a fresh app, I strongly recommend doing analytics with Firebase.

The Google pod depends on Firebase. Change your Podfile to directly depend upon GoogleAnalytics without the slash.
pod 'GoogleAnalytics'

Related

IOS app doesn't show up in Firebase Analytics

I build a firebase iOS app. It works with Firestore and it works fine but the problem is the app doesn't show up when I click on dashboard (under analytics in the Firebase console). I have reinstalled firebase (multible times) and I have checked if analytics was enabled and it was. Does anyone know what I need to check or something?
I followed the instructions from firebase when adding firebase to the IOS project (if this was installed correctly firestore wouldn't work). The only difference that I didn't use cocoapods but Swift package dependencies. I followeded this instructions: https://firebase.google.com/docs/ios/swift-package-manager. The reason that I didn't use cocoapods is that I just can't get accesses to the iOS project. It keeps giving me zsh: permission denied. I have tried everything from chmod 777 to using sudo. I gave the terminal full disk acces but I keep getting permission denied. Anyway that's why I use swift package manager. I use the following dependencies:
FirebaseAnalytics
FirebaseFirestore
FirebaseCrashlytics
Everything works fine apart from getting user data on the dashboard. Does anyone know what this problem could be? I don't know what code to give. I do use FirebaseApp.configure() in AppDelegate (otherwise Firestore wouldn't) work. But I do get this error in the logs:
app[74317:4168079] [] nw_protocol_get_quic_image_block_invoke dlopen libquic failed
Because of confusion in the comment section this edit.
Firebase gives you automatically all kinds of information on the analytics page about your app. When enabled the only thing you need to do (according to the docs) is call FirebaseApp.configure() in AppDelegate. I have done this and it works because otherwise Firestore would not work. But the IOS app doesn't show up on the analytics page. I have reinstalled Firebase 6 times on my IOS app and still nothing. Does anyone know what could possible go wrong? Because this should all work automatically so I don't know what code to post.
I forgot to add -ObjC to my build settings. That fixed my problem.
Link: https://firebase.google.com/docs/ios/swift-package-manager#analytics

What is the difference between Firebase/Auth and FirebaseUI/Auth?

For Firebase iOS, if I want to do user authentication, is there any difference between these 3 choices?
FirebaseUI
FirebaseUI/Auth
Firebase/Auth
And it would be great if someone can explain the pros and cons of using the "pre-built" FirebaseUI and the Firebase authentication SDK?
The Firebase/Auth pod is the core SDK for Firebase Authentication. You can't do authentication without it. It provides no UI.
FirebaseUI is UI components built on top of Firebase Authentication that handles login flows that make your app easier to write. You can't use it without Firebase/Auth.
If you see One thing in Docs Listed At - https://firebase.google.com/docs/auth/
It provide full sign in flow to your app , All pods frameworks needed to sign in through app is provided by that
--> A short Difference let me try to Explain with pod File
-> If used pod 'FirebaseUI'
Refer to Docs Page at - https://firebase.google.com/docs/auth/ios/firebaseui
And you will see
pod 'FirebaseUI/Auth'
pod 'FirebaseUI/Google'
pod 'FirebaseUI/Facebook'
pod 'FirebaseUI/Twitter'
pod 'FirebaseUI/Phone'
For login procedures like Facebook and google is being provided with pods using firebaseUi only
Whereas in pod 'Firebase/Auth'
if you look to if we need to connect Facebook or gmail we explicitly use default Pods being provided with Social services as
and for Facebook
Second Again referring to main Doc - https://firebase.google.com/docs/auth/
Under Firebase SDK Authentication you can see what various integration we can use
i.e You can sign in users to your Firebase app either by using FirebaseUI as a complete drop-in auth solution or by using the Firebase Authentication SDK to manually integrate one or several sign-in methods into your app

Where can I find the google cloud messaging library, before it used firebase?

Does any one have, or know where i can find the google cloud messaging library from before it started using firebase?
I know that it is advised to update to firebase but this is out of scope.
Thanks
I believe you can just install it with Cocoapods with the last version of the pod before Firebase:
pod 'Google/CloudMessaging', '2.0.4'

iOS Rejection due to Google SignIn. Latest Google SignIn (4.0.0) goes to safari

our app got rejected by apple for
Design - 4.0
We noticed that the user is taken to Safari to sign in or register for
an account when logging in with Google+, which provides a poor user
experience.
Next Steps
Please revise your app to enable users to sign in with Google+ in the
app. You can do this by updating to the latest Google+ SDK.
We recommend implementing the Safari View Controller API to display
web content within your app. The Safari View Controller allows the
display of a URL and inspection of the certificate from an embedded
browser in an app so that customers can verify the webpage URL and SSL
certificate to confirm they are entering their sign in credentials
into a legitimate page.
I am using pod and have the latest Google SignIn library, not a GooglePlus one.
The library 4.0.0 (15/05/2016), says on release notes
https://developers.google.com/identity/sign-in/ios/release
Removes allowsSignInWithBrowser and allowsSignInWithWebView properties
from GIDSignIn.
That means that I don't have a way to force it on iOS 8 to have the default iOS 9 behavior (Open a safari like browser within the app). Having installed Google App or Google+ App makes no difference.
Tried to downgrade to 2.4.0 using cocoa pods but it says
Analyzing dependencies [!] Unable to satisfy the following
requirements:
Google/SignIn (= 2.4.0) required by Podfile
Google/SignIn (= 2.4.0) required by Podfile
Any ideas?
Thanks in advance
Finally I managed to make changes and get it aprooved by downgrading to GoogleSignIn 3.0.0 which has
allowsSignInWithBrowser and allowsSignInWithWebView properties
Which I make use of with
allowsSignInWithBrowser = NO
allowsSignInWithWebView = YES
Had to change the pod file to this in order to make everything build (having google analytics too made the thing so much difficult, cause of dependecies).
Hope Google Engineers update the SignIn 4.0.0, because I don't like having old libraries, but I can't have my app rejected until Google Changes the libs
pod 'Google/Analytics'
pod 'GoogleSignIn', '3.0.0'
pod 'Google/SignIn'
pod 'Google', '2.0.4'
pod 'GoogleAppUtilities'
pod 'GoogleAuthUtilities'
pod 'GoogleNetworkingUtilities'
Good luck to you guys too,
Thanks Paulw11, he made a test project and saw the same problem in iOS8.
also, telling reviewers that other (even big) apps in App Store are usign webview even if iOS9, not only iOS8, did not help, because they said this cannot be a reason for other apps to be, and they are working hard to reject other too.
If Any changes made, for example a new GoogleSignIn library, please make a new answer!

iOS - Duplicate symbols when added Firebase Messaging (conflict with Google Analytics)

I want to add Firebase Cloud Messaging to my project which has already other services from Google (like Analytics). I am using cocoapods and I added to my podfile:
pod 'Firebase'
pod 'Firebase/Messaging'
I run pod install and everything looked good but when I am trying to build project I get many duplicate symbol errors:
duplicate symbol _OBJC_CLASS_$_ACPGmpAudienceRoot in:
.../Pods/Google/Libraries/libGGLCore.a(GmpAudience.pb.o)
.../Pods/FirebaseAnalytics/Frameworks/FirebaseAnalytics.framework/FirebaseAnalytics(GmpAudience.pb_d68254ec585824fa42de6de2f056cda0.o)
... more and more duplicate symbol errors ...
How can I fix it? Why with Messaging there is added Analytics library too? I don't need it. I tried Clean project and delete Derived data but for now without luck.
Update your Google/(Google analytics) pod version to 3.0 higher .
I was using version 2.0.4, I did pod update and the following pods were update:
Installing Google 3.0.3 (was 2.0.4)
Installing GoogleSignIn 4.0.0 (was 3.0.0)
After that I was able to use Google analytics with Firebase
Depending on your use case, one thing you can consider: If you use Google Tag Manager, you can integrate with Firebase Analytics, and use GTM to forward the event data to Google Analytics if you prefer to have app and web data together or want to use Google Analytics for some other reason.
I have exactly the same issue - an iOS app that is already using Google Analytics, but I want to add Firebase Messaging, just so the app can have a push notification capability. I added "pod 'Firebase/Messaging'" to the Podfile, and had the same linking errors on compiling.
A lot of searching revealed this compiler setting: Your Target -> Build Settings - Apple LLVM 7.1 - Code Generation -> No Common Blocks - set it to 'Yes', like this:
On Xcode 7.3 it seems the default for that setting is 'No', bu on making that change all the linking errors went away and the app built without issues.

Resources