Could not build module Firebase

若如初见. 提交于 2019-12-11 07:38:15

问题


I have been trying to wire up Firebase analytics into a Objective C/Swift project. I have followed the instructions properly. My search paths are set. My linker flags is set to -ObjC. I can get the project to compile properly. As soon a I @import Firebase and build, I get an error that says cannot build Firebase module. When I look into the logs I see there is a parse issue building Firebase analytics and Firebase Core. I have wired this into three other projects fine not using cocoa pods. Please advise.


回答1:


I have faced this issue and tried everything possible:

- (Checked that I was actually using .xcworkspace instead of .xcproj)
- Deleted Derived Data
- Cleaned Pods folder, deleted Podfile.lock, pod deintegrate and pod install / update again
- Deleted cached file everywhere on my mac (including hidden folders in Library/Caches/Cocoapods), /var/folders etc.
- Deleted the project, uninstalled Xcode, reinstalled, cloned again etc.
- Check all Build Settings in Xcode, desperately tried all options

Nothing worked.

The only solution (and the correct one) was to run a sudo gem install cocoapods to go from 1.2.0 to 1.2.1.

Indeed, you can see that in the changelog for 1.2.1 there is this pull request that fixes import issues with vendor frameworks

TL;DR If you are running cocoapods 1.2.0, you will want to run sudo gem install cocoapodsand make sure you are at least running 1.2.1.

You can check your version by typing pod --version anywhere on your terminal.



来源:https://stackoverflow.com/questions/42015931/could-not-build-module-firebase

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!