Xcode will build/run but archive fails with “No such module Google” - Swift iOS

帅比萌擦擦* 提交于 2020-01-14 10:42:46

问题


My app has been working fine until Xcode 7.1. In fact, it still runs on both the simulator and iPhone, but when I archive it, I get the error "No such module Google." I have cocoa pods updated to 0.39 and have tried for hours with tweaking the options, from reinstalling cocoa pods to removing the Google Analytics cocoa pod and adding it manually, etc. However, nothing has worked, and whenever I archive the app, I receive an error, yet it still runs fine.

Any thoughts?

Thanks!


回答1:


Turns out the issue was with Google Analytics for cocoa pods. I completely removed the cocoapod and switched to Flurry.




回答2:


For me it turned out, that I had forgotten to put

use_frameworks!

into the Podfile. After adding this line and updating the pods it worked. Just make sure to import all modules in all depending classes.

Edit: Official blog resource from cocoapods



来源:https://stackoverflow.com/questions/33401842/xcode-will-build-run-but-archive-fails-with-no-such-module-google-swift-ios

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