我创建了一个新的应用程序,我想使用react-native-firebase
。不过,我不断收到此错误:
RNFirebase核心模块没有在iOS原生发现,确定您已经正确地包含在项目的Podfile'的RNFirebase吊舱,并运行“荚安装”。
见http://invertase.link/ios为IOS安装指南。
我已经做了步骤:
yarn add react-native-firebase
react-native link react-native-firebase
pod update
after确保我使用Ruby 2.5.0我目前使用的吊舱文件是:
# 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作为POD直接安装:
pod 'RNFirebase', :path => 'path/to/node_modules/react-native-firebase/ios'
更改或硬编码HEADER_SEARCH_PATHS
没有帮助我。当再次出现错误,这是没有必要rm -rf node_modules
也不删除荚文件等,我认为有必要清除缓存。
我一向不喜欢使用荚与反应原生,然而,反应 - 本机火力对非弹出安装说明将无法工作。
这样做的原因是该包的搜索路径其中假定任一/或荚/火力
因此,使其连接正确请按照下列步骤操作:
import <Firebase.h> and [FIRAPP configure];
在didFinishLaunchingWithOptions
$(PROJECT_DIR)/Firebase
我有同样的问题,同时试图修复它使我的应用程序崩溃的开始了。
我把它通过终端ios/AppFolder/
下,但Xcode中从来没有意识到这个文件。
什么帮助我是打开我的Xcode项目。我AppFolder > Add Files
然后左键单击,然后添加GoogleService-Info.plist
。