我正在构建一个使用React本机的应用程序,我必须将geo坐标插入到我的防火墙数据库中,我使用的是firebase、firestore和geofirestore,我已经遵循了一些教程,但仍然无法完成这个工作,您能不能帮助我,这是我的代码:
import firebase from '@react-native-firebase/app';
import firestore from '@react-native-firebase/firestore';
import * as geofirestore from 'geofirestore';
我正在尝试将我的firestore与我的当前用户链接起来。在我添加firebase.auth()之前,一切都正常工作。
我有一个错误,找不到变量: firebase
还有我的函数:
createUser = () => {
firebase.auth().onAuthStateChanged(function(user) {
if (user) {
// User is signed in.
firestore()
.collection('Users')
.add
我已经开始尝试使用,但是我似乎无法在没有缺少文件的情况下运行它:
Android Bundling failed 597ms
While trying to resolve module `firebase` from file `C:\Users\wootk\Documents\GitHub\React-and-rNative\React Native\React Native, Firebase v9, authen
tication and firestore\FirebaseAuthApp\firebase\firebaseConfig.js`, the package `C
我可以记录数据,但似乎不能显示它,屏幕完全空白。我没有收到任何错误,但屏幕上还是什么都没有 import React from 'react';
import { View, StyleSheet, Text } from 'react-native';
import firestore from '@react-native-firebase/firestore';
import { FlatList } from 'react-native-gesture-handler';
export default class St
嗨,我一直在尝试从React本地应用程序访问Firestore
我的试用码
import firebase from '@react-native-firebase/app'
import firestore from '@react-native-firebase/firestore';
import * as Actions from '../../../StateManager/Actions/ActionTypes'
export function getVersion() {
return async (dispatch) =
我在这个问题上被困太久了。我刚刚开始在我的本机应用程序中使用react-本机-firebase实现Firestore。我只是在跟踪docs ,但它对我不起作用。
这是在Android里。还没有在iOS上进行测试。
我一直在犯这个错误:
[TypeError: undefined is not a function (near '...this._firestore.native.collectionGet...')]
以下是相关代码:
import React, {Component} from 'react';
import { firebase } fr
当我试图在iOS中运行自己的时,我得到了这个错误:
[!] CocoaPods could not find compatible versions for pod "Firebase/Auth":
In Podfile:
Firebase/Auth
RNFBAuth (from `../node_modules/@react-native-firebase/auth`) was resolved to 10.5.1, which depends on
Firebase/Auth (~> 7.4.0)
CocoaPods could n
这是我的实现,我将baseURL存储在我的firestore数据库中。我过去常常匿名登录,以便获得url。但是在调用firestore时,我的应用程序崩溃了,没有任何错误,警告等。 import {create} from 'apisauce';
import auth from '@react-native-firebase/auth';
import firestore, {firebase} from '@react-native-firebase/firestore';
const apiClient = create({
met