Firebase Crashlytics: Same app sending to different firebase projetcs [duplicate] - firebase

I am building an android library that I plan to integrate into many 3rd party apps(which do not belong to me).
So, I am trying to figure out a way to find out if any of those 3rd party apps crashes due to the code in my library. Is there any way to find that out?
I was looking at Crashlytics to achieve the same. But, as I understand, Crashlytics will be able to give the Crash analytics to only the app owner, right? Is there any way to collect the crash info without the intervention of the 3rd party app?
Thanks.
EDIT: This isn't a duplicate of Integrating Crashlytics to library project because I want Crashlytics to be part of an android library which will sit on multiple android apps, but I want to be notified separately - not from the app which is installing my android library.

Mike from Fabric here. Adding Fabric or Crashlytics into a library that will be used by external developers is not supported and should not be done.

No, you cannot, at least without some hacking. Crashlytics should only be user in applications or library subproject (https://docs.fabric.io/android/crashlytics/build-tools.html#set-up-a-library-subproject). And you shouldn't, crashlytics group all the crashes by package name. Even if you with some hacking were able to include the crashlytics in your library you will probably receive also crashes from the application (not related with your library), and you will need to include and expose your API keys in your library... So you should not include crashlytics in a library.

Related

Is Firebase App Check available for Unity, Godot, or other game engines?

I am about to start making a game for iOS/Android which involves connection to Firebase backend.
Since the game contains a bit controversy theme, I'm scared of DDoS kind of attacks.
To make protection, I know Google provides Firebase App Check service and they say it's available for iOS/Android/Flutter/Web according to their webpage.
https://firebase.google.com/docs/app-check
My question is, is the service available for Unity, Godot, or other game engines?
Since App Check SDK is available for Flutter, does this mean we need SDK for Unity, Godot etc. if we use those engines?
Or can we just use Firebase iOS/Android SDK together with any game engine?
I checked whether they provide SDK (with App Check) for any game engine and only found that Firebase Unity SDK seems to be trying to implement App Check feature (but not done yet).
https://github.com/firebase/firebase-unity-sdk/issues/511
It would appear Firebase is available in the Play Core Native SDK, so it would be possible to use GDNative to access the API.

does the new firebase crashlytics platform allow to combine iOS and Android reporting?

I know that for Fabric two separate apps are required for Android and iOS even though they can share common codebase (and so common event source) using Ionic/Cordova.
Was unable to figure out from the Firebase Crashlytics documentation if it is possible to combine the reports across iOS/Android and if not if this is considered for the future (I'd appreciate any tickets/threads on this)?
Whats interesting Fabric to Firebase migration documentation concerning organizing projects for Apple shows mainly Android apps on screenshots.
It doesn't. However, using the BigQuery export you'd be able to report across platforms. This would be useful for cases of aggregation only. Or if you use logs and keys as you'll be able to create custom filters around those.

Does Firebase Real-Time DB now explicitly require Google Play Services? [duplicate]

This question already has answers here:
Which firebase services require google play services on Android?
(4 answers)
Closed 4 years ago.
Background
I have an older app that still runs properly and is based on an old version of Firebase using the Real-time database functionality.
It runs on my emulator that does not have Google Services available.
Attempting To Upgrade To New Firebase
Now, I'm attempting to upgrade that code and I'm running on an emulator image that does not have Google Play services available.
Installed Firebase Via Android Studio Tools...Firebase...
I did the installation via the built-in tools from Android Studio (following the latest docs from Firebase).
The Problem
Every time the new code based on the latest version of Firebase attempts to call the following line of code I get an error (follows):
FirebaseDatabase fbd = FirebaseDatabase.getInstance();
Error Message
I get the following error:
Default FirebaseApp is not initialized in this process . Make
sure to call FirebaseApp.initializeApp(Context) first.
I'm Already Making That Call
However, I am successfully making the call to FirebaseApp.initializeApp(Context) previous to that line of code -- I've stepped thru via debugger.
Unsure About Google Services
I've seen that some say you have to add a reference to the Google Services but I'm not sure why the Firebase docs don't mention that and the built-in Android Studio tool didn't add it.
Can you point me to a definitive place in the docs where it says you need Google Services? Has anyone experienced this? Does anyone know for sure if Google Services are required?
Ok, I looked more closely at the Firebase docs (https://firebase.google.com/docs/reference/android/com/google/firebase/database/FirebaseDatabase.html#getInstance(java.lang.String))
Here's a snapshot of the info:
I'm adding that because of that odd Also: Google Play Services item. It's a link that does nothing. It isn't very helpful, but
I'm assuming it means that you do indeed need Google Play Services to be available.
This situation is odd for another reason also, and that is because the call to FirebaseApp.initializeApp(this); succeeds without error even though you can basically do nothing after that, since you will have a dependency upon Google Services for the core functionality.

Expo and react-native-firebase

I'm trying to integrate Firebase into my expo app using the react-native-firebase framework which has several advantages over the regular firebase package when it comes to react-native apps.
However, I'm running into difficulties since the instructions say I must add the GoogleService-Info.plist to ios/[YOUR APP NAME]/GoogleService-Info.plist, and expo apps don't have an ios folder from what I understand.
Am I pretty much screwed or is there a solution for this?
As the react-native-firebase documentation says, you need to eject your app if you want to use this library with expo. Be mind that eject action is not reversible. More info here and here and here.
If you use Expo and would like to use this package, you'll need to
eject. If you do not want to eject, but wish to make use of features
such as Realtime Database (without offline support) & Authentication,
you can still use the Firebase Web SDK in your project.
Today, you can't have the Firebase react-native sdk with expo. And this is not planned according to: https://expo.canny.io/feature-requests/p/full-native-firebase-integration.
So you have to play only with the javascript sdk from Firebase.
Cloud Firestore is new, it will be better for the javascript sdk for offline and sync.
The author of this thread: Fresh Detached Expo + RNFirebase not running on Android has managed to get it working with the Detached ExpoKit - so it's not a full ejection and keeps the expo features.
I have asked for the steps he took so we can see about getting something added to our docs and possibly a Detached ExpoKit version of our starter app.
See the expokit detaching docs for information about ExpoKit.
It's in progress --
https://blog.expo.io/using-firebase-in-expo-e13844061832
Using Firebase in Expo
And how we plan on adding it to the client 😁
We are super excited to announce that we will be rolling out a suite of Unimodules that will provide you with easy access to native Firebase features! initially you will only be able to use these in a detached ExpoKit App. But over time we will be working to add these to vanilla Expo.
TL;DR
Here are the modules, you will need to detach to add them for now:
App/Core
Analytics
Authentication
Cloud Firestore
Cloud Functions
Instance ID
Performance Monitor
Realtime Database
Cloud Storage
Remote Config
Firebase Cloud Messaging
Remote Notifications
Dynamic Linking
Invites
Crashlytics
Also TL;DR
Here is a boilerplate: https://github.com/EvanBacon/expo-native-firebase
Update 02-12-2021
Guys expo's eas-build is now public. You can add custom native codes and use react-native-firebase. Here is the link to a youtube tutorial. The video is short and super easy to follow. Here is the link to the docs
Previous answer
If you are using Firebase using the mobile configuration, it does not work, but it worked smoothly when I tried the web configuration. Here is the youtube tutorial. Watch from 38:20 to set up.
I managed to get a working set of react-native with redux, firestore and expo. See Code example at Github.
But it costs the offline-persistence (see https://github.com/firebase/firebase-js-sdk/issues/436). So from my point of view it costs performance, because i need to be online to get a full working app with firestore and react-native.

What are the main differences between Firebase vs Firebase 2.0?

Google just released Firebase 2.0.
It seems they are completely separate platforms.
Firebase: https://www.firebase.com/
Firebase 2.0: https://firebase.google.com/
APIs are also different.
Firebase: https://www.firebase.com/docs/web/api/
Firebase 2.0: https://firebase.google.com/docs/reference/js/#firebase
Could someone explain the differences in the core concepts on both mobile and web?
I've been building an app using old Firebase.
Should I change my codes to use Firebase 2.0?
The new version of Firebase is the same platform - it just adds a whole range of new features, so the big change to the core concepts is an expansion of what you can do.
The Realtime Database offers the same functionality as before, but with a refreshed API and a new console. You can keep using the same approach and data model as before, and the API changes are largely cosmetic (renaming to be consistent with the newer features).
Authentication is pretty similar, but it has been expanded to include new features like account linking and customizable emails. You should be able to upgrade your application to the new SDKs and console pretty easily: take a look at our migration guides for Android, iOS and the web.
You can import your project at any time. Your applications and the existing SDKs will continue to work. You can then update your code when you are ready to use some of the new Firebase features in your application.
The new concepts are really around the new features:
Analytics is a new mobile-first analytics product that gives free and unlimited event reporting, and allows building audiences which can be used in many other services.
Storage allows you to store and serve user-generated content, such as photos or videos.
Remote Config allows you to change the behavior and appearance of your app without publishing an app update.
Cloud Messaging is a cross-platform messaging solution that lets you reliably deliver messages and notifications at no cost. Notifications gives you a tool in the Firebase Console to send re-engagement messages easily.
Crash Reporting lets you collect crash data from your Android and iOS apps, to find and fix problems more quickly.
Dynamic Links are smart URLs that dynamically change behavior to provide the best experience across different platforms. They allow you to use deep links that survive app installs on Android and iOS.
Several existing Google products have been integrated into Firebase as well
Invites replaced AppInvites, giving easy way to sending personalized email and SMS invitations. App Indexing gets your app into Google search.
Firebase now also integrates with AdWords to let you target ad campaigns with Analytics audiences, and AdMob to automatically track in-app ad effectiveness.
Its a lot of new features, but you don't have to try them all at once! Once you upgrade, its straightforward to pick and choose.

Resources