Firebase Emulator Suite Admin SDK & FCM - firebase

I have a fairly complex solution built upon Firebase including Firebase Auth, Firestore, Storage, Functions, FCM, and a few Google APIs. (This is a mobile application). A lot of my logic is in Functions, specifically notifications using FCM. I noticed a lot of errors in my logs when running locally. I don't think it's hurting anything, but I was wondering if there was a way in Functions if I could determine that I was using the local emulator suite and not run certain logic. Or better yet, if I could still use outside logic within the functions running locally. The biggest one being FCM. I also use some of the Google APIs, but I get an error because the Firebase Emulator Suite uses a different projectId.

Related

Using both Firebase and Amplify in one React native App

There is a big debate on the internet about Firebase vs Amplify. Get that. What I dont get is why so little to noone actually considers using both, or nobody just writes about it. To me both have clear advantages in different fields:
Firebase definitely seems to be handier when it comes to analytics and push notifications , AWS doesnt even offer ads as far I as know. And Pinpoint is quite confusing in its documentation.
AWS Cognito make more sense to anyone using AWS Services for the backend.
Firebase also offers all analytics and messaging for free regardless of the amount of data, whereas in AWS as usual you are hooked in right away with more AWS services. Firebase Storage is also more expensive than AWS once you have some significant traffic.
So I was thinking why not using Amplify SDK for Cognito and S3 whereas Firebase SDK takes care of analytics, Push Notifications and Ads. I dont see any disadvantages myself, but again - i have never built a mobile app, I am a pure backend developer. Can anyone come up with problems of this setup or just confirm it is absolutely fine?
Thanks!
ps. i am thinking of an app written in react native
I'm early into very similar research, so take this information with a grain of salt.
Regarding push notifications, Amplify's documentation for Android includes either setting your app up in Firebase or using Pinpoint. This documentation can be found here:
Amplify Push Notifications - Getting Started
This appears to be a direct tie to Firebase's push notification functionality, so I don't believe you'd get any of the other features Firebase offers with this implementation.
Regarding the other features, I believe your assessment is correct in that whichever deployment toolchain you choose to use you're subject to their analytics options.
I am also working on something similar and have always wondered why there isn’t more out there on this subject. Leveraging the best from both seems like the next step when looking to implement either.
Did you come across any issues?
I’m using Firebase SDK for Authentication, Auth, and Firestore (albeit will probably switch to S3 for storage). Amplify for everything else. NextJs frontend, no mobile.

for a company interested to use only Firestore, what is the differrence between gcloud and Firebase CLI

My straight question is: since I am not interested in other Google Services, only Firestore, what is the difference between Firebase Cli and gcloud? Can I do all I need only with Firebase Cli or should I learn also gcloud?
I can easilly see that gcloud can handle more services than Firebase Cli. Also I can see Firebase Cli remenber me a lot the purpose of npm+ng cli when working with NodeJs/Angular (a simple analogy about scaffold/initialize/deploy). Nevertheless, our company will only use Firestore to take advantage of its Realtime Database pushing events to our mobile application.
I use Firebase Cli to type in my Windows command line and create a project in Firebase. I can see the result in Firebase Console and I also can see it in Console Cloud Plataform.
For me, who is total beginner with Google Cloud Plataform, it is a bit confused when prefer one over other. For instance, let's say I want to query data from Firebase Crashlytics from command line instead of logging from my Browser. Is it possible to use either Firebase Cli or gcloud? If both, which one is recommended for some company only interested in Firestore project?
This week I am struggling to figure out how to extract metrics regard my Firestore project and if I don't know what is the recommended tool for reach this task it make even harder to find the first steps. By extracting I don't mean see a beatifull dash in Google Console. I mean consume an endpoint providing me Firestore Metrics or, even better, subscribe my endpoint to Firestore project which will be called every time some issue happens (Other question asking exactly about getting Firestore metrics)
It is confusing and is partly the result of Google's acquisition of Firebase, the creation of what's now called Firestore (which is the unification of the original Firebase backend technology and Google Cloud Datastore), and that Google provides the Firestore service to both its Firebase and Google Cloud developer audiences.
As you've gathered, Google Cloud's CLI (Cloud SDK aka gcloud) and the Firebase CLI overlap in functionality. However, importantly:
both CLIs interact with a shared set of Google services (e.g. Firestore, identity, logging etc.).
there are some Google Cloud services not part of Firebase and vice versa
If you're focused on Firebase, you should be to able to stick with the Firebase CLI and continue to interact with Google's services through this Firebase lens.
If you include Google Cloud Platform services that aren't part of Firebase, you'll need to then consider using gcloud but importantly, you can either:
continue to use the Firebase CLI for the Firebase services;
use gcloud to interact with some (not all!) of the Firebase services (e.g. Firestore).
Over time, I assume (!) the remain discord between these 2 platforms will diminish.
If you consider both platforms as the result of (an ongoing?) unification since the acquisition, hopefully, these discrepancies will be more understandable and less frustrating.
Where you do find inconsistencies and frustrations, ensure Google knows by submitting feature requests and bugs.

Is there any API or firebase command to obtain a list of UUID's for iOS devices in Firebase App Distribution

We have a few cross-platform apps in development, for android setting up a CircleCI workflow to deploy to Firebase app distribution has been fairly straight forward, but for iOS I can't seem to find a good way to obtain the UUID for iOS testers that AppDistribution retrieves for us.
Is there any way to get a list of registered device UUID's?, I would rather not have to rely on parsing the email notifications.

Is it possible to deploy Firebase functions outside of Google Cloud?

I'd like to implement a full text search an app that is using Cloud Firestore.
Integrating with Algolia sounds great, but it can't work on the free Spark plan since outbound networking is limited to Google services only.
Therefore, the obvious question:
(1) Is it possible to use firebase-functions to create a function that monitors Firestore changes and deploy it to something like Zeit's Lambda or AWS Lambda?
Somewhat related question:
(2) Is it possible to use onSnapshot instead of onCreate/onUpdate/etc. to monitor Firestore changes?
You can't deploy Cloud Functions code to other serverless function providers. You can certainly try to reuse your core logic, but each provider has its own APIs and infrastructure, and firebase-functions only knows how to work with Cloud Functions.

Can Firebase be used in an app supported by another Backend and Database?

I am looking to make an app that would have its Backend on another service like AWS or some other. This app would be having many features and functionalities.
But for chat feature, I am exploring options and wondering that would I be able to integrate Firebase in my app.
I have read about Firebase Functions to add more functionality at the backend and also the installation of Firebase Admin to servers.
But still I am not convinced about their capabilities and exactly what all I can do with them.
It would be great if someone who has experience with Firebase help me out figuring if going with it is the best case for me or is there something else I should look into.
So first you can't use Firebase in combination with AWS or Azure etc. Firebase is based on Google Cloud and is the interface between the mobile client (the running app on the client's smartphone) and the backend (your Firebase project).
What I use is, for example, Firebase Cloud Messaging, to simply notify one or multiple users by trigger an HTTP Request from my own web server.
I also made some apps to store the data in FireStore or in the Realtime-Database, so that I don't have to set up a whole new infrastructure. And this is basically the goal of Firebase that you can simply start with your app, without carrying about that.
So what I've heard about Firebase is that you currently cannot install Firebase on a server of your choice and you have to use Google Cloud.
Hopefully, you can do something with my answer. If you have further questions feel free to ask them.

Resources