【发布时间】:2018-08-31 20:15:50
【问题描述】:
我创建了一个新应用并尝试使用react-native-firebase。但我不断收到此错误:
在 iOS 上未原生找到 RNFirebase 核心模块,请确保您有 在您的项目“Podfile”中正确包含 RNFirebase pod 和 已运行“pod install”。
有关 ios 设置指南,请参阅 http://invertase.link/ios。
我已经完成的步骤:
yarn add react-native-firebasereact-native link react-native-firebase- 在 .../myproject/ios/myproject 下从 Google 设置我的 .plist 文件
- 在确保我使用的是 Ruby 2.5.0 之后运行
pod update - 运行 pod 安装
我目前使用的pod文件是:
# Uncomment the next line to define a global platform for your project
platform :ios, '9.0'
target 'MyProject' do
# Uncomment the next line if you're using Swift or would like to use dynamic frameworks
# use_frameworks!
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Messaging'
target 'MyProjectTests' do
inherit! :search_paths
# Pods for testing
end
end
这些是我正在使用的版本:
"react": "^16.3.0-alpha.1",
"react-native": "0.54.2",
"react-native-firebase": "^3.3.1",
【问题讨论】:
-
确保在 RNFirebase 的标头搜索路径中启用了递归
标签: react-native cocoapods react-native-firebase