xcode 没有这样的模块“Firebase”?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/37848474/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 08:54:49  来源:igfitidea点击:

No such module 'Firebase'?

xcodefirebasecocoapods

提问by OtherClare

Why do the folders of my workspace still remain the in xcodeproj file?

为什么我工作区的文件夹仍然保留在 xcodeproj 文件中?

Why do the folders of my workspace file still remain in the xcodeproj file? In other words, Group "BrieflyA" and its contents from the elevated window(xcodeproj) should be above the "Pods" Group in the behind window (workspace), but instead it is titled as "BrieflyA.xcodeproj". Trying out the SDK hereshows that a working firebase project has all of those contents under the same xcodeworkspace. Could that be the reason why I am getting this error, because I'm trying to build it in xcodeproj? If so how can I fix this becuase I did a full clean and even started a new project, but continue with the same error.

为什么我的工作区文件的文件夹仍然保留在 xcodeproj 文件中?换句话说,组“BrieflyA”及其来自提升窗口(xcodeproj)的内容应该在后面窗口(工作区)中的“Pods”组上方,但它的标题是“BrieflyA.xcodeproj”。在这里试用 SDK表明,一个有效的 firebase 项目在同一个 xcodeworkspace 下拥有所有这些内容。这可能是我收到此错误的原因,因为我正在尝试在 xcodeproj 中构建它?如果是这样,我该如何解决这个问题,因为我做了一个彻底的清理,甚至开始了一个新项目,但继续出现同样的错误。

回答by Nishant Roy

platform :ios, '9.0' use_frameworks! pod 'Firebase', '>= 2.5.1

platform :ios, '9.0' use_frameworks! pod 'Firebase', '>= 2.5.1

  • Have your podfile look like this.
  • Run pod install again
  • Try opening the .xcworkspace file through terminal
  • Cmd-Shift-K to clean the file
  • Cmd-B to build the file
  • 让你的 podfile 看起来像这样。
  • 再次运行 pod install
  • 尝试通过终端打开 .xcworkspace 文件
  • Cmd-Shift-K 清理文件
  • Cmd-B 构建文件

That should fix it.

那应该解决它。