【问题标题】:'FirebaseCore/FirebaseCore.h' file not found in RNFIRMessaging.h在 RNFIRMessaging.h 中找不到“FirebaseCore/FirebaseCore.h”文件
【发布时间】:2021-09-13 11:16:12
【问题描述】:

我想归档一个用 react-native 编写的项目的 ios 部分,但在文件 'RNFIRMessaging.h' 中我收到错误 'FirebaseCore/FirebaseCore.h' 找不到文件。

我使用 GoogleMLKit/TextRecognition 框架,这要求我在 Podfile 中使用 use_frameworks!。并与Firebase/Messaging 一起形成冲突。

我尝试删除 Podfile.lock 并重新安装,使用 modular_headers => true 并清理 DerivedData 目录,但似乎没有任何效果。

我的播客文件:

platform :ios, '10.0'

rn_path = '../node_modules/react-native'

target 'app' do
  # Uncomment the next line if you're using Swift or would like to use dynamic frameworks
  # use_frameworks!

  # Pods for handiCash
  pod 'Google-Mobile-Ads-SDK', '7.55.0'

  use_frameworks!
  pod 'GoogleMLKit/TextRecognition'

  pod 'yoga', path: "#{rn_path}/ReactCommon/yoga/yoga.podspec"
  pod 'React', path: rn_path, subspecs: [
    'Core',
    'RCTImage',
  ]

  pod 'Firebase', '6.9.0'
  pod 'Firebase/Messaging'
  pod 'Firebase/Analytics'

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

end

我使用 Xcode 12.5.1

【问题讨论】:

  • 尝试将 use_frameworks! 指令移动到 Podfile 的顶部
  • 谢谢@PaulBeusterien,我试过了,但不幸的是没有帮助。

标签: ios firebase react-native cocoapods google-mlkit


【解决方案1】:

我最终回滚了所有更改,并再次从头开始实施它们。这次不知为何奏效了……

【讨论】:

    猜你喜欢
    • 2019-07-13
    • 2021-09-14
    • 2019-11-25
    • 1970-01-01
    • 2019-02-04
    • 2020-10-09
    • 2022-11-03
    • 1970-01-01
    相关资源
    最近更新 更多