【发布时间】:2019-10-13 04:14:34
【问题描述】:
适用于 iOS 的 React Native Firebase 安装在“运行您的应用程序以验证安装”屏幕上被阻止。
React Native Firebase 之前为我在 Android 上工作过。
我遵循了这些说明。
https://rnfirebase.io/docs/v5.x.x/installation/ios https://firebase.google.com/docs/ios/setup#add_the_sdk
这是我到目前为止所做的。
-在 Firebase.google.com 页面中设置项目。
-在那里创建一个 iOS 应用程序。
-通过 npm 安装 react-native-firebase。
-将 GoogleService-Info.plist 文件添加到 XCode 中的项目中。
-更改 ios/[您的应用程序名称]/AppDelegate.m 文件。
-创建一个新的 Podfile(Cocoa pod)并通过“pod update”命令对其进行更新。
-根据指令向 Podfile 添加和编辑行。
-运行“pod install”
-从项目根目录运行“react-native link react-native-firebase”。
-单击 Firebase 控制台中的“下一步”按钮,然后转到“运行您的应用程序以验证安装”部分。
-通过运行“react-native run-ios”命令在模拟器上运行 iOS 应用程序。
应用程序启动并在模拟器中正常运行。
Firebase 页面中没有任何反应。
这是我的 Podfile 的前几行。
# Uncomment the next line to define a global platform for your
project
platform :ios, '9.0'
# Required by RNFirebase
pod 'Firebase/Core', '~> 5.20.1'
target 'My_App_Name' do
【问题讨论】:
-
在原生iOS中除了
Firebase/Core,还需要导入特定的Firebase模块,如Firebase/Firestore、Firebase/Storage等 -
哈!这是否意味着如果您只有 Core,Firebase 身份验证将无法识别它?我不知道!谢谢。这次我尝试了 Analytics 和 AdMob 模块。但同样的结果。仍然停留在“运行您的应用程序以验证安装”。
标签: ios iphone firebase react-native ios-simulator