Firebase rules - check for ios - android

I'm using firebase for my iOS + android app.
I want to remove my iOS app and leave only the android app. (I know its a weird request).
In order to do that I want to block requests to firebase for my iOS app but not from my android app.
So my question is -
How can I block the request for my iOS app on firebase without destroying my android app.
Can I use the firebase rules in some manner?
Can I remove my iOS app from firebase somehow?
Thanks

You can actually delete an app from your Firebase project, so request coming from deleted app wont be responded because the app does not exist and in the case of iOS, the .plist firebase file used for auth will not work anymore.
In order to delete the iOS project, go to:
Project Overview -> iOS app that you want to delete -> Configuration (Where it has some dots in the corner)
(Sorry my panel is in spanish, but you can see where the app config panel is)
You will find a Delete application button right in the bottom of the page.

You can remove the iOS app from Firebase console itself.
Project settings (near project overview) -> Delete iOS APP.

Related

Removing An App From Project - Will That Break The Related Android App?

We need to remove an app from our Firebase project, which seems easy, but I am curious if anything will happen in the Android app that's associated with the Firebase app?
Basically, if the Android app is making Firebase pushes, and no corresponding Firebase ID exists anymore, will the Android app have any issues, or will Firebase gracefully handle it?
It will not effect to the other apps. For example, if you have 2 apps A & B. You remove A, then B still work. But, the app A will not be supported by the current Firebase project anymore.
If you create another new Firebase project for A. Then, the below flow you should do.
Update new google-services.json file for A.
Make a force update version to make sure that the old version of A will be ended.
Publish new version of A.

Connecting Android app with web (and using the same database) [duplicate]

Is it possible for multiple android applications to access a single firebase backend. If no what is the alternative in such situation?
Yes, it is possible. Go to your firebase console. Select home tab. Click on Add App. Select Add firebase to your Android App. Provide the necessary details for the package name. Download the latest config file and add it to all the android apps connected to this firebase project.
Yes, you only need to setup your Firebase object with the same url(db).
Check the documentation for more. https://www.firebase.com/docs/android/guide/retrieving-data.html
With Android Studio 2.2 and upwards you can easily create and add apps to you Firebase project without leaving your work environment and no need to download google-services.json
From Android Studio go to Tools->Firebase and create, add apps to project of choice :)
Guide
Yes, it is possible for multiple applications to access the same Firebase Database.
From Android Studio v2.2 onwards, you can directly link an app to a Firebase database via the Firebase Assistant.
Here is how to do so:
Go to Tools and click on the Firebase option.
From the Firebase Assistant, select Realtime Database
Click on the Connect to Firebase button in the Assistant, which will show you a dialog allowing you to select an existing Database or create a new database. Click on Choose an existing Firebase project, select the Database you want to use and click on the Connect to Firebase button in the dialog.
Your app will automatically get connected and you will be able to access your database.
In the firebase console you’ll be having the option to connect the firebase to corresponding platform and it’s configuration. You can use that to add same firebase project to any desired platform.
Yes, it is! a single firebase database can be access by multiple app.. provided each of your apps use the same authentication details. The Firebase documentation will be a big help. https://firebase.google.com/docs/
I have 2 of my app accessing 1 firebase database account, so, i am quite sure it will work for you my friend!
Yes, You can use the same firebase database in more than one android application as below:
In the Project Overview section of Firebase Console add an android application.
For adding this application first you need to give that package name.
Download config file in JSON format.
Note: you must be download a new copy of JSON because in that JSON
file included package name of your application and all.
Add some repository and implementation in both(Project/Module) build.gradle file.
Ready to access firebase database in new android application.
Click Add App Button and first option Choose your App platform.
Second step Register you application paste your app package name.
And third step download the google config file the file paste your
project's app folder and start your second application.

Can I automate to create android app to firebase project?

My application has many flavor that has different application id. I want to register these applications to create to Firebase project.
I want to automate below process:
Create android application in Firebase project.
Enable crashlytics for the applitaion.
Download google-service.json of the project.
Firebase Management API seems to be able to first one, but other can't. I try using puppeteer to control Firebase console in browser, but google prevent to log in by automated browser.
Is there any other solution?
To download google-services.json, you can call projects.androidApps.getConfig from the management API.
For the second one, it's currently not possible. Contact Firebase support to file a feature request.

Android - firebase cloud messaging, two apps in one firebase project

I have two android applications. I am using only one firebase project for both of them, with both applications included in it. So I have only one google-services.json with specified keys for both my applications. I am trying to use firebase cloud messaging and I am experiencing following problems:
When I want to test cloud messaging from firebase console I am able to choose to which appId I want to send a message. I have both applications installed on my device. Both are working normally. I have also released them to google play (alpha testing) and everything went well. I am able to download them from store normally. AppId should be set properly (how can I check that?). Problem is, that when I choose the first app in firebase console I am receiving notifications from both apps and when I choose the second app I am receiving nothing.
What can cause these problems? Do I need to create completely new firebase project for the second app, too? Or am I missing something?
If you need to see some code, let me know. At this point I don't know what piece of code could tell you more about my problem.
It looks like you have used same google service json file on both your apps. So thats why sending cloud notification for one app is received on both apps while in second case since no app has the json file for that there is no notification.
Go to your firebase project settings and download the google services file for both app ( you should first download one and move that file to desired project then download second services file).

Update UI in android App without making users to update the App

I am building an app using , so the first time I upload the app to playstore, it will go with pre-defined Menu options and other stuffs.
Now, suppose I want to add a menu option in the Header of the App for any festive seasons or some awesome offers, and on clicking the menu, I should display the latest offers.
Is there any way to implement this feature without having to go through the process of again uploading to appstore and making users to update the app??
There is a concept of Over The Air (OTA) updates which you are referring to here. This is provided by Expo (by default create-react-native uses expo), firebase and Microsoft code push. You can read about it more here on official expo docs. If you are not using Expo then i prefer Code Push
Build an api endpoint you call at the app startup seems to be the easiest way to do this. Take a look at firebase if you don't want to build a full api and server yourself. Cloud functions are easy to use and could do the job in your case.

Categories

Resources