我正在尝试将react-native-firebase添加到新创建的expo项目中,我成功弹出了应用程序,但是当我尝试添加库时,项目无法构建,并且出现以下错误
ERROR: In project 'app' a resolved Google Play services library dependency depends on another at an exact version (e.g. "[15.0.
1]", but isn't being resolved to that version. Behavior exhibited by the library will be unknown.
Dependency failing: com.google.android.gms:play-services-flags:15.0.1 -> com.google.android.gms:play-services-basement@[
15.0.1], but play-services-basement version was 16.2.0.
Run Code Online (Sandbox Code Playgroud)
我更新了所有 firbase 依赖项,但它仍然失败,然后我使用这一行强制停止错误,这样我至少可以构建
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
以前的错误消失了,但我保留了不同的错误。例如:
Error: Program type already present: com.google.android.gms.internal.measurement.zzbk
Run Code Online (Sandbox Code Playgroud)
平台:Ubuntu 19:04 博览会:最新的react-native-firebase:5.2.5
gradle(项目)文件
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript …Run Code Online (Sandbox Code Playgroud) 我希望运行一个根据我的云功能中的每个用户运行的调度程序,而不是为所有用户同时运行的通用调度程序。
\n\n例如,如果用户 A 执行某个操作,则仅为用户 A 启动调度程序(例如,每 30 分钟一次),而不为其他用户启动。\n但用户 B 也会执行相同的操作,并在不同时间为自己启动调度程序。
\n\nNow UserA\xe2\x80\x99s and UserB\xe2\x80\x99s scheduler could be running at different times but same intervals(30 mins)
\n\nHow can I create such a function?\nHelp would be very much appreciated.
\n我已经使用react-native-firebase集成了crashlytics ,并且我已将所有必需的dSYM上传到控制台中。因此,崩溃被显示,但它们被混淆了,并且无法以这种格式追踪它们。
Fatal Exception: RCTFatalException: Unhandled JS Exception: TypeError: undefined is not an object (evaluating 't.code')
This error is located at:
in O
in B
in p
in RCTView
in Portal.Host
in c
in h
in s
in v
in u
in RCTView
in RCTView
in o
0 CoreFoundation
Run Code Online (Sandbox Code Playgroud)
我试图以某种方式消除它们的混淆,但没有成功。有任何想法吗?
最近更新了@react-native-firebase/auth,现在Recaptcha verifier更新的版本里有添加。
但我不想,即使我没有配置任何Recaptcha,但它在使用电话号码登录时会自动打开react-native,这不是一个好的体验。
我怎样才能禁用它,这可能吗?
firebase react-native firebase-authentication react-native-firebase
谷歌AdMob最近宣布为iOS 14+做准备。需要AppTrackingTransparency权限。但是,对于通过rnfirebase使用 AdMob 的 React Native 开发人员来说,还没有路线图。我的react-native项目目前依赖于react-native-firebase版本v6.7.1:
"dependencies": {
"@react-native-firebase/admob": "^6.7.1",
"@react-native-firebase/app": "^6.7.1",
...
Run Code Online (Sandbox Code Playgroud)
我只是在我的应用程序中使用InterstitialAdand BannerAd:
import { InterstitialAd, TestIds, AdEventType,
BannerAd, BannerAdSize} from '@react-native-firebase/admob';
Run Code Online (Sandbox Code Playgroud)
升级项目以支持 iOS 14+ 的路线图应该是什么?
我正在研究react-native-firebase crashlytics.我正在使用rnfirebase入门套件.在那里,我们将崩解与项目整合在一起.现在,我想让我的应用程序崩溃以检查崩溃报告.
我正在尝试向从我的应用程序注册的用户发送电子邮件,但我得到auth/internal-error了回应。有人可以帮我解决这个问题吗???
var currentUser = firebase.auth().currentUser;
var actionCodeSettings = {
url: WEBSITE,
iOS: {
bundleId: getBundleIdentifier()
},
android: {
packageName: getBundleIdentifier(),
installApp: false,
minimumVersion: '1'
},
handleCodeInApp: false,
dynamicLinkDomain: getDynamicLink()
};
currentUser.sendEmailVerification(actionCodeSettings).then(function () {
console.log('email sent');
}, function (error) {
console.log('email not sent ' + error);
});
Run Code Online (Sandbox Code Playgroud)
这是我用来向注册或登录用户发送电子邮件的代码,下面是我记录的控制台错误
Error: An internal error has occurred, please try again.
at createErrorFromErrorData (NativeModules.js:155)
at NativeModules.js:104
at MessageQueue.__invokeCallback (MessageQueue.js:414)
at MessageQueue.js:127
at MessageQueue.__guard (MessageQueue.js:314)
at MessageQueue.invokeCallbackAndReturnFlushedQueue (MessageQueue.js:126)
at debuggerWorker.js:80
Run Code Online (Sandbox Code Playgroud)
详细错误说明:
code: "auth/internal-error"
domain: …Run Code Online (Sandbox Code Playgroud) firebase react-native firebase-authentication react-native-firebase
我正在使用 react-native-firebase 7.0.1 中的云消息传递。
我不想在 firebase 中存储 iOS 设备令牌,所以我使用getAPNSToken()方法然后将它存储在我的后端。
我可以在设备上发送通知,按下它后,应用程序就会打开。
但是当我尝试从getInitialNotification()or获取消息时,onNotificationOpenedApp()它总是返回null/ undefined。
它每次都适用于Android。
推送处理程序
import React from 'react';
import messaging from '@react-native-firebase/messaging';
export default class PushHandler extends React.Component {
constructor(props) {
super(props);
this.messageApp = messaging();
}
componentDidMount() {
this.messageApp.onNotificationOpenedApp(remoteMessage => {
if (remoteMessage) { // <- always null on iOS
// handle notification
}
});
this.messageApp.getInitialNotification().then(initialMessage => {
if (initialMessage) { // <- always undefined on iOS
// handle notification
} …Run Code Online (Sandbox Code Playgroud) push-notification ios firebase react-native react-native-firebase
我有一个带有 react-native-firebase 的 react native 应用程序,我正在尝试运行一个可调用的 https firebase 函数,该函数部署到自定义区域。
我已经读过,firebase.app().functions("MY-REGION")所以我尝试了以下操作:
import { firebase } from "@react-native-firebase/database"
import functions from "@react-native-firebase/functions"
firebase.app().functions("MY-REGION")
Run Code Online (Sandbox Code Playgroud)
但是如果我运行它,我会收到这个错误:
Error: You attempted to use
"firebase.app('[DEFAULT]').functions" but this
module could not be found.
Ensure you have installed and imported the
'@react-native-firebase/functions' package
Run Code Online (Sandbox Code Playgroud)
功能包已安装。
如果我删除@react-native-firebase/functions导入,错误保持不变。
如何在 中指定 firebase https 函数的区域react-native-firebase?
firebase.initializeApp({
...options
})
firebase.app().functions("MY-REGION")
Run Code Online (Sandbox Code Playgroud)
那说 Error: Firebase App named '[DEFAULT]' already exists
firebase.initializeApp({
...options
}, "APP_NAME")
firebase.app("APP_NAME").functions("MY-REGION")
Run Code Online (Sandbox Code Playgroud)
给 Error: No firebase App …
javascript firebase google-cloud-functions react-native-firebase
我在响应本机 Firebase 电话身份验证时遇到问题。当我运行该函数时,该应用程序重定向到 reCaptcha,但随后屏幕保持黑色且 reCaptcha 不出现。起初它工作正常,但当我更换项目主管时它坏了。最奇怪的部分是,应用程序在冻结一段时间后没有错误,只是冻结和/或崩溃。
我重新安装了 node_modules。此外,我生成了一个新的 sha1 代码并尝试在另一台计算机上运行它以查看 sha1 是否可能是原因。我尝试创建一个全新的 react-native 项目,但仍然没有变化。
套餐:
"@react-native-firebase/app": "^10.0.0", // also tried older
"@react-native-firebase/auth": "^10.0.0", // also tried older
"react": "16.13.1",
"react-native": "0.63.3"
Run Code Online (Sandbox Code Playgroud)
我的登录功能:
const loginWithPhoneNumber = async () => {
const confirmation = await auth().signInWithPhoneNumber(firebaseTestPhonenumber);
};
Run Code Online (Sandbox Code Playgroud) react-native ×8
firebase ×5
admob ×1
android ×1
crashlytics ×1
expo ×1
ios ×1
ios14 ×1
javascript ×1