React native 错误:在iOS上本机找不到RNFirebase核心模块
我创建了一个新的应用程序,正在尝试使用React native 错误:在iOS上本机找不到RNFirebase核心模块,react-native,cocoapods,react-native-firebase,React Native,Cocoapods,React Native Firebase,我创建了一个新的应用程序,正在尝试使用react native firebase。但我不断地犯下这样的错误: 在iOS上未本机找到RNFirebase核心模块,请确保 将RNFirebase吊舱正确包含在项目“吊舱文件”中,并且 已运行“pod安装” 有关ios安装指南,请参阅 我已采取的步骤: 纱线添加反应天然firebase react-native-link react-native-firebase 在…/myproject/ios/myproject下从Google设置my.plist
react native firebase
。但我不断地犯下这样的错误:
在iOS上未本机找到RNFirebase核心模块,请确保
将RNFirebase吊舱正确包含在项目“吊舱文件”中,并且
已运行“pod安装”
有关ios安装指南,请参阅
我已采取的步骤:
纱线添加反应天然firebase
react-native-link react-native-firebase
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",
我也有同样的问题,当我试图修复它时,我的应用程序在启动时崩溃了 我将它移动到了
ios/AppFolder/
下的终端,但Xcode从未意识到这个文件
帮助我的是在Xcode中打开我的项目。然后左键单击我的
AppFolder>addfiles
,然后添加GoogleService Info.plist
如果不想手动链接,可以尝试将RNFirebase作为pod直接安装:
pod 'RNFirebase', :path => 'path/to/node_modules/react-native-firebase/ios'
更改或硬编码
标题搜索路径
对我没有帮助。当错误再次出现时,无需rm-rf节点\u模块
或删除pod文件等,我发现清除缓存非常有用。我始终不希望将pod与react-native一起使用,但是,react-native firebase关于非pop安装的说明将不起作用
原因是包的搜索路径假定为/pods或/firebase
因此,要使其正确链接,请遵循以下步骤:
import和[FIRAPP configure]代码>在didfishlaunchwithoptions
$(PROJECT\u DIR)/Firebase
确保在RNFirebase的标头搜索路径中启用了recursive