【发布时间】:2019-11-25 18:01:29
【问题描述】:
我在我的 xcode 项目上尝试 Product -> Archive 时遇到问题。我收到错误消息:
'FirebaseCore/FirebaseCore.h' file not found
Could not build Objective-C module 'Firebase'
此错误仅在我使用通用 iOS 设备作为我的设备执行 Product -> Archive 时发生,而不是在真实设备上运行模拟器时发生。
我已经在互联网上的其他地方寻找答案,但没有找到有效的解决方案。
正如link 在我的 podfile 中将 Firebase 恢复到版本 4.13.0 对我不起作用。注释掉use frameworks 对我不好;我需要它用于其他豆荚。
这个link 建议我这样做:
关闭 Xcode,
rm -rf ~/Library/Developer/Xcode/DerivedData/,
pod deintegrate,
pod install,
重启 Xcode
但是,这也不起作用。
一个link 建议我通过将其添加到我的 podfile 的末尾来取消链接 react-native-firebase:
post_install do |installer|
system("mkdir -p Pods/Headers/Public/FirebaseCore && cp Pods/FirebaseCore/Firebase/Core/Public/* Pods/Headers/Public/FirebaseCore/")
end
但这只是将错误消息转移到No such module 'Alamofire'。使用它我无法获取 Product -> Archive 以识别 Alamofire。
这是我的 podfile 供参考:
# Uncomment the next line to define a global platform for your project
platform :ios, '11.3'
target 'Spotbirdparking' do
# Comment the next line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Spotbirdparking
pod 'Stripe'
pod 'Alamofire'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Storage', '~> 5.0'
pod 'Firebase/Database'
pod 'SDWebImage'
pod 'GoogleMaps'
pod 'GooglePlacePicker'
pod 'GooglePlaces'
pod 'IQKeyboardManagerSwift', '~> 5.0'
pod 'JTAppleCalendar', '~> 7.0'
pod 'MBProgressHUD'
pod 'themis'
target 'SpotbirdparkingTests' do
inherit! :search_paths
# Pods for testing
end
end
我对此非常坚持,已经看了好几天了。非常感谢任何帮助。
【问题讨论】:
-
你读过这个吗? github.com/invertase/react-native-firebase/issues/1166。我的猜测是它与
use_frameworks!有关,因为它说“如果你不使用 Swift,请在下一行评论” -
阅读,这是我引用的第一个链接,我无法评论
use_frameworks -
查看当前的 pod Firebase Documentation。另外,确保你的 cocoapods 更新到 1.10.1 或更高版本
pod --version