【发布时间】: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