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

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

Related

Differences BW Facebook Login and FBSDKLoginKit Pod and which one to use?

I was trying to integrate facebook login in my iOS app. I am reading the official docs for this purpose.
On this getting started link. Documentation say to use the following pods
pod 'FacebookCore'
pod 'FacebookLogin'
pod 'FacebookShare'
So i understood that i have to use pod FacebookLogin and that's it.,
BUT
On this iOS login Docs page, Docs say to use
pod 'FBSDKLoginKit'
I am totally confused about which one to use.
What's the difference between the two?
Note: I just want to perform facebook login in my app and nothing else.
If you are using swift then use 'FacebookCore' and FacebookLogin'.
For objective C use 'FBSDKLoginKit'.
But if you see internally in podfile, they use objective C code via bridging.
You should use below pods for Login with Facebook using Swift
pod 'FacebookCore'
pod 'FacebookLogin'
pod 'FacebookShare'
Because in their official documentation's guideline for integrating Facebook Login in Swift they have mentioned those pods, so there may be some difference which they made for Swift and that's why they provide separate pods. You can assume pod 'FBSDKLoginKit' is for Objective-C because they shown Objective-C sample code on that page. Otherwise officially they haven't made any notes or declaration about these differences.
As of November 2019 the standalone swift SDK has been deprecated in favor of a single repository.
Therefore, it you should be using FBSDKCoreKit, FBSDKShareKit and FBSDKLoginKit with Cocoapods.
We plan on archiving this repo on November 1, 2019. This gives users one month to follow the instructions below for migrating to the new source code location. At this time we will also deprecate the CocoaPods FacebookCore, FacebookLogin, and FacebookShare.
The current documentation is a little bit confusing, as this section is actually referring to Swift Package Manager, not Cocoapods.
For projects that include Swift, use 'FacebookCore', 'FacebookLogin', and 'FacebookShare'
For projects that do not include Swift, use 'FBSDKCoreKit' 'FBSDKLoginKit' and 'FBSDKShareKit'

Firebase error even if I don't use it

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'

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