I am getting an error in react-native, This Browser is not supported
, in the iOS simulator, after running the following code:
const firebase = require('firebase')
const firebaseConfig = require('./firebase-config')
firebase.initializeApp(firebaseConfig)
firebase.database().ref('test').set('hello')
firebase-config contains a databaseURL.
why?
No, you can't install apps into the iOS simulator except for an app you can actually build in Xcode. Use a real iOS device to test using different browsers.
Launching the Simulator, though, always requires opening Xcode and going to Developer Tools. Because the Simulator. app is embedded within the Xcode app bundle, apps like LaunchBar won't find it to index it.
Firebaser here
The new Firebase Authentication currently doesn't work in React Native due to a dependency on the window
object. We're looking if that's something we can improve, but no guarantees.
From Jacob's post on the firebase-talk list:
As a "workaround" if you don't need auth (unlikely, I know, but still worth mentioning), you should be able to do the following:
var app = require('firebase/app');
var database = require('firebase/database');
Apparently, the new Firebase Javascript client library depends on localStorage, and thus fails to start in some cases, such as Safari in Private Browsing Mode.
As a workaround, I uploaded a patched version of the new client library to github: https://github.com/urish/firebase-localstorage-fix/blob/master/firebase.js
I do hope that the team will fix this issue soon, but in the meantime the patched version does the trick for me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With