3

如标题中所述,我在一年前最初启动该项目时尝试构建和运行曾经可以工作的项目时遇到的两个错误如下:

Could not build objective-c module 'Firebase'

'FirebaseAnalytics/FirebaseAnalytics.h' file not found

我的 podfile 如下:

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

# Comment this line if you're not using Swift and don't want to use dynamic 
frameworks
 use_frameworks!

# Pods for MyProject

target 'MyProject' do

    pod 'Firebase'
    pod 'Firebase/Database'
    pod 'Firebase/Auth'
    pod 'Firebase/Storage'    

    # Pods for testing
 target 'MyProjectTests' do
    inherit! :search_paths
    pod 'Firebase'
 end

end

GitHub 上的一个建议是将我的标题搜索路径更改为“继承!:完成”,但这不起作用。我是否应该将其更改为 podfile 部分下的“继承!:search_paths”?

同样,这个项目一年前运行良好,现在我得到了这些错误。

非常感谢任何和所有帮助。

4

2 回答 2

0

保罗先生的回答也没有解决我的问题。但这似乎也是 CocoaPods 的问题。

使用 . 将您的 CocoaPods 版本更新为 1.4.0 gem install cocoapods --pre。您可能还需要 sudo 权限。这样做解决了我的问题。

于 2017-12-05T16:59:07.063 回答
0

仅在下添加"${PODS_ROOT}/Firebase/Core/Sources"到测试目标Build Settings -> Header Search Paths

GitHub 问题上的详细信息。

于 2017-06-25T15:04:11.377 回答