Firebase realtime database location... NO NEXT BUTTON - firebase

I was trying to get Realtime Database on Firebase, but it doesn't show me a 'NEXT' button when I'm trying to get the database location.
I was following online tutorials which are supposed to look like this:
and I have no idea why it happens like this to mine only

Most likely the problem for not displaying the "Next" button is related to your browser. The simplest solution to solving this kind of issue is to try to use the Firebase Console on another browser.

Related

Firestore webpage shows wrong data

I have a small problem that is driveing me crazy.
It seems that the Firestore Webpage is not showing my Database correctly.
If i add data via flutter it shows up immediately. And if i delete it again via code it dissapears like it should.
But if i delete in inside the Browser. It disapears but i can still access it via code.
The same thing applies to editing via the Browser. It changes visually but accessing via code i get the old Value. I thought i might be a delay so I waited until the next Day, but the web View and the code Values where still different.
Is this a Bug ?
.collection(FirebaseAuth.instance.currentUser!.uid)
.doc("SavedChain")
.snapshots()
.first;
This is how i access the data.
This is how i delete it
After deleting it, it disapears like it should. But i can still access it with the code above.
I suspect that snapshots().first gives you the cached value for the document. If that is the case, the solution is to use get() instead of those two calls:
.collection(FirebaseAuth.instance.currentUser!.uid)
.doc("SavedChain")
.get();

Firebase Dynamic Link Click Count

We are planning to integrated firebase dynamic link to track content sharing and referrals in our app.
Firebase provides analytics data for how many times a user clicked on a url as mentioned here.
Since we are going to generate these links programmatically for referrals, is there any way to do a more granular tracking ?
Like if I want to see how many times all the links generated were clicked.
Or something like how many times a link with a particular parameter was clicked.
I tried looking through firebase docs but I don't think these usecases are covered there.
And if thats correct, what is a better way to track this ?
If you want to collect the analytics data for programmatically created dynamic links, you'll have to use REST API. Though, I also think that you can use BigQuery but I haven't tried this before. Collecting the data via Firebase Console is not yet available.

How to log Firebase Analytics screen name in a SwiftUI app?

I'm trying to log screen names in my app but I have like 95% not set in Firebase Analytics.
In onAppear for a view I do Analytics.setScreenName("screenName", screenClass: "screenName")
Should I do this differently? It seems that Analytics for iOS works in conjunction with UIViewControllers but since this a SwiftUI app and there is no documentation on how to work with that.
Update
This is now possible using the analyticsScreen view modifier. See the source code
We are working on a better solution for this. As you mentioned, the way the view controller hierarchy of a SwiftUI app is made up, this is not entirely trivial to solve, but we've got a couple of ideas.
In the meantime, you might want to try this workaround that some people have suggested on the Github issue:
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
Analytics.setScreenName("todo_tab", screenClass: String(describing: type(of: self)))
}

Can't add anything to Cloud Firestore from console

I've searched all the internet, but found no similar resolved issues.
So, I'm playing around with Cloud Firestore and my issue is simply that I can't add anything to Firestore from console, I click on "Add collection", enter name, then generate random id for new document, and add a single string to it. After clicking "Save", nothing is added and screen still says "No data at this location yet". I tried reloading, logging off and in again, adding only empty collection, etc. Anyone knows what could be wrong? Maybe that's some bug because Firestore is in beta?
I was facing the similar issue, after a lot of research, I found out that there is an issue with chrome browser. Just open the same console with firefox browser, you will be able to do all the operations :)
I had the same issue. Try to go to the collection that you have created directly via parent path.
EDIT:
Sorry, I was wrong. Problem still occurs. Found out antivirus blocks these operations. I'm using kaspersky
Similar problem here. It works after I enable data collection on Kaspersky.
If there is no document in the collection, the collection disappears. The process is fairly fail-proof. You can enter 1 as the document name and 1 as the string field leaving the value blank and it will still write.
Try adding a different data type. Also, try and use one of the SDKs, the web (browser) or admin (Node.js) SDK to write (.set) data in a document firebase.firestore().collection("test").doc().set({"name":"john"}); with the test/open security rules in place.
NOTE:
Firebase does not accept undefined values by default.
Check your values: Having undefined values could well be the reason.
Following Xavi's advice, I found out that it worked on Safari, I then went back to the Chrome Firebase console and logged out of all accounts and re-logged in with the account I have Firebase access to, and I am now able to read and write from the console and also from my React app.

How to add login via Twitter functionality with Firebase?

I read the documentation on https://www.firebase.com/docs/ios/guide/login/twitter.html. I downloaded and added the two files as it says in the documentation. I also imported Accounts at the beginning of the files, so Xcode builds successfully. Then I copied the exact code in the documentation to my twitterLogin IBAction, and set my Twitter API Key and Firebase base reference.
The problem is that when I click on my twitter login button, nothing happens. (It used to say no twitter accounts, then I set my account in the Settings.) I even put print statements in any if-else case but none of them prints. So is there any suggestions for making Twitter login work? I don't think Firebase is missing anything. But please give some suggestions on how to figure out the issue at least.
Check to make sure that you have Enabled Twitter Authentication in your Firebase Dashboard, and that the apiKey in your project matches the one that is in your Dashboard.
Hope that helps :)
I solved the issue. The 'funny' solution was to add an equal sign to the condition
if accounts.count > 1
For anyone who is not lucky enough to notice that the sample code in the Firebase documentation is weirdly working only for users that have 'more' than 1 twitter account signed in the device, I believe this answer would help to save some time.
I also think that this sample code is misleading.(may be something that shouldn't be the default case in the sample code)
I have recently found some pretty good stuff on exactly this topic may it can help someone:
https://medium.com/reversebits/twitter-authentication-in-firebase-for-android-51d1460dc6a9#.strjpm90r

Resources