Javascript Can';设置是否响应本机firebase?

Javascript Can';设置是否响应本机firebase?,javascript,firebase,react-native,react-native-ios,react-native-firebase,Javascript,Firebase,React Native,React Native Ios,React Native Firebase,我有一个react native项目,我想使用react native firebase, 我只是按照所有的步骤在IOS中进行设置, 但是每次我建立这个项目时,我都会犯这个错误 找不到“RNFirebaseUtil.h”文件 在这条路上 /卷/App/node_模块/react native firebase/ios/RNFirebase/functions/RNFirebaseFunctions.m 在XCode中 那么我该如何解决这个问题呢 "dependencies": { "

我有一个react native项目,我想使用react native firebase, 我只是按照所有的步骤在IOS中进行设置, 但是每次我建立这个项目时,我都会犯这个错误

找不到“RNFirebaseUtil.h”文件

在这条路上

/卷/App/node_模块/react native firebase/ios/RNFirebase/functions/RNFirebaseFunctions.m

在XCode中

那么我该如何解决这个问题呢

 "dependencies": {
    "firebase-admin": "^8.1.0",
    "firebase-functions": "^3.0.1",
    "react": "16.8.6",
    "react-native": "0.59.8",
    "react-native-firebase": "5.3.1",
  }
播客文件

# Uncomment the next line to define a global platform for your project
# platform :ios, '9.0'

target 'App' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for App
    pod 'RNFirebase', :path => '../node_modules/react-native-firebase/ios'

# Required by RNFirebase
  pod 'Firebase/Core', '~> 6.5.0'

# # [OPTIONAL PODS] - comment out pods for firebase products you won't be using.

  pod 'Firebase/Auth', '~> 6.5.0'
  pod 'Firebase/Database', '~> 6.5.0'
  pod 'Firebase/Functions', '~> 6.5.0'
  pod 'Firebase/Storage', '~> 6.5.0'


  target 'AppTests' do
    inherit! :search_paths
    # Pods for testing
  end

end

target 'App-tvOS' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for App-tvOS

  target 'App-tvOSTests' do
    inherit! :search_paths
    # Pods for testing
  end

post_install do |installer|
  rnfirebase = installer.pods_project.targets.find { |target| target.name == 'RNFirebase' }
  rnfirebase.build_configurations.each do |config|
    config.build_settings['HEADER_SEARCH_PATHS'] = '$(inherited) Pods/Headers/Public/**'
  end
end

end

看起来您的版本不匹配。如果您使用的是react native firebase 5.3.1(来自package.json),那么您应该在此处查找ios SDK版本:

此外,与5.3.1 rnf和.59.8 rn不匹配。对于该rn版本,您应该使用5.5.x rnf。请看这里:

如果要将react native firebase从5.3.x升级到5.5.x,请确保也升级SDK。因此,您可以通过此处更新您的pod:


对我有用的是

  • 1.在所有firebase软件包上运行npm卸载,然后重新安装
  • 2.在ios文件夹中运行“pod更新”
  • 按住command+option+shift+k键清理xcode生成文件夹
  • 重新构建项目

你运行pod安装吗?@Maleking是的,当然谢谢,@ageoff,我用这些版本更新了pod文件,但问题仍然很严重!我猜现在是RN和react本机firebase库不匹配。如果您使用的是RN的.59.8,那么您应该使用5.5.x firebase,而不是5.3.x。请参见此处:@OliverD我更新了我的答案,提供了有关版本不匹配的更多详细信息。如果您还没有这样做,我还建议您直接删除您的POD,以便在POD文件更改之间完全清除它。我将执行所有这些操作:(但我有新的问题路径>节点模块/react-native firebase/ios/RNFirebase/perf/RNFirebasePerformance.h错误'
react/RCTBridgeModule.h'文件未找到