How to programmatically get Crashlytics version with Firebase on iOS - ios

With Fabric, it was the following (answered here):
Crashlytics.sharedInstance().version
With Firebase:
the instance is Crashlytics.crashlytics(), but there is no version on it
nothing of interest in FIRCrashlytics.h
Since Crashlytics is an NSObject, Crashlytics.version exists, but it's equal to 0.
I also looked on the FirebaseCrashlytics module to no avail.
The Crashlytics version is actually printed in the console when running FabricApp.configure in the AppDelegate, so it's clearly defined somewhere, but I need to access it to display it in the app:
${time_stamp} ${app_name}[${process_id}] [Firebase/Crashlytics] Version 4.3.1

The API was added to Firebase/Crashlytics 7.1.0: https://firebase.google.com/docs/reference/ios/firebasecore/api/reference/Functions#/c:#F#FIRFirebaseVersion
Swift:
FirebaseCore.FirebaseVersion()
Objc
FIRFirebaseVersion()

Chintan from Firebase here. This has just been implemented in the latest version of Crashlytics iOS SDK (7.0.1). So from now on Crashlytics will use the same version as iCore, so here’s the API for it: https://firebase.google.com/docs/reference/ios/firebasecore/api/reference/Functions

Related

OAuthProvider for Twitter iOS Log In with Firebase has wrong constructor

I am using the following tutorial to implement Twitter log in for an iOS app: https://firebase.google.com/docs/auth/ios/twitter-login.
I follow all the steps & when I get to var provider = OAuthProvider(providerID: "twitter.com"), Xcode is not happy. I get Argument passed to call that takes no arguments.
I am importing Firebase and installing the Pods as shown.
Any idea on what could be going wrong? Thanks!
I had already face the same problem, and it was solved by updating Firebase/Auth by Pod
pod update

How to programmatically disable CrashReporting in current Crashlytics (3.14.*) / Firebase (1.10.*) on iOS

I'd like to enable and disable Crash Reporting in my current iOS app programmatically. I'm using
Crashlytics: 3.14.0
Fabric: 1.10.2
Firebase (Core / Analytics): 6.9.0
The official Firebase documentation at https://firebase.google.com/docs/crash/disable-sdk?hl=en tells me to use the following code:
Crash.sharedInstance().crashCollectionEnabled = false
But this doesn't work / seems to be outdated as
There's no Crash-Class or -Symbol.
There's a Crashlytics class, which seems to be the new Crash-class, but it doesn't have a crashCollectionEnabled property
There seems to be no other API in Crashlytics / Fabric / Firebase to achieve this
I know I could write a custom exception handler and forward received exceptions on demand to Crashlytics, but I don't want to implement such a dirty solution.
Does anybody know a clean way of enabling / disabling Crashlytics in a running iOS app?
for Fabric/Crashlytics: don't call this:
Fabric.with([Crashlytics.self])

Google Sign in fails on iOS 13 GM

My app has a Sign in with Google button. When I try to sign in on iOS 13.0 GM GIDSignInDelegate didSignInForUser:WithError: returns this error:
Error Domain=com.google.GIDSignIn Code=-1 "The operation couldn’t be completed. (org.openid.appauth.general error -3.)"
I have no clue how to fix this issue. I'm using Google Sign In 5.0.0 as part of Firebase 6.8.1.
I figured it out! The AppAuth-iOS, which is a open-source dependency of GoogleSignIn SDK, has been updated from 1.1.0 to 1.2.0 in August, including this iOS 13 support. So you need to run pod update GoogleSignIn to update the AppAuth to 1.2.0. The GoogleSignIn SDK itself hasn't been updated since 5.0.0, so that got me confused.
Following is the solution for successfully having the login
view. Call the signin method after the ViewController's view is appeared,
it will not be dismissed programatically. I have just implemented in
IOS 13 and it works fine.
override func viewDidAppear(_ animated: Bool) {
super.viewDidAppear(animated)
GIDSignIn.sharedInstance()?.delegate = self
GIDSignIn.sharedInstance()?.presentingViewController = self
GIDSignIn.sharedInstance()?.scopes = [kGTLRAuthScopeDrive]
GIDSignIn.sharedInstance()?.prepareForInterfaceBuilder()
GIDSignIn.sharedInstance()?.signIn()
}
I downloaded the Firebase 6.9.0 SDK zip and experienced this same issue. The README indicated that the bundled version of AppAuth was 1.2.0. I was able to resolve it by updating AppAuth to the master version.
Specifically, I removed the AppAuth framework included with Firebase, and instead build AppAuth using Carthage.
For future reference when other users find this question:
Google fixed this issue in GoogleSignIn v5.0.1. When updating your app to iOS 13, you'll likely have to update the GoogleSignIn SDK as well.
If you are using Firebase 6.9.0 from Carthage, add github "openid/AppAuth-iOS" "master" to your Cartfile below any Firebase entries.
Sorry if wrong.
I thought this error would happen without targeting.
Support not only from 13, but also from 10.
Solution, but don't keep your pod version up to date.
4.4.0.
pod 'GoogleSignIn', '4.4.0'
It was all right for this version.
I anticipated the error. Less than
The new version may use some code generated by xcode11.3,
So new is OK, existing one may stop processing at 13

[Firestore][I-FST000001] Could not reach Firestore backend

I have configured Firebase/Firestore, but Firestore return this error ever:
[Firestore][I-FST000001] Could not reach Firestore backend.
I'm using Swift 4 and Xcode 9. Any idea?
Update 10th March 2018 - thanks to richardfrk
This issue has now been fixed in Firebase SDK 4.10.1
Unfortunately I experienced this bug yesterday for Firebase SDK 4.10.0 and have reported it directly to one of the Firebase engineers working on the iOS SDK. For me, I only had this error when the user is not authenticated. As soon as the user is authenticated, the problem went away.
For now, I'd recommend sticking with Firebase SDK 4.9.0 until they fix it in the next update.

error: no known class method for selector 'isPedometerEventTrackingAvailable'

I am using Diagnostic plugin to my IOS IONIC 2 app. i am getting an error when i do ionic build ios with production mode (--prod). Could anyone help me how to solve this issue?
Thanks in advance:)
error: no known class method for selector
'isPedometerEventTrackingAvailable'
return [CMPedometer respondsToSelector:#selector(isPedometerEventTrackingAvailable)] &&
[CMPedometer isPedometerEventTrackingAvailable];
Check github issue.
Also here.
Either update your Xcode version to 8.0 or above.
cordova.plugins.diagnostic#3.2.0 adds support for the new
UserNotifications framework added in iOS 10. To build using v3.2.0,
you will need to use XCode 8+ because there's no way to conditionally
include a framework using the tag in the plugin.xml.
Or downgrade your diagnostic plugin to 3.1

Resources