This Browser is not supported in iOS simulator

前端 未结 2 1343
Happy的楠姐
Happy的楠姐 2021-02-15 17:32

I am getting an error in react-native, This Browser is not supported, in the iOS simulator, after running the following code:

const firebase = requi         


        
相关标签:
2条回答
  • 2021-02-15 17:39

    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');
    
    0 讨论(0)
  • 2021-02-15 17:45

    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.

    0 讨论(0)
提交回复
热议问题