Xcode (Swift) 中没有这样的模块“Firebase”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38156920/
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
no such module 'Firebase' in Xcode (Swift)
提问by evanhaus
I have been looking up on every website that had a similar/identical issue to this Xcode error and I have tried everything and nothing has worked. Most people say cleaning and building the project will make Firebase recognized but that hasn't worked. I've tried a bunch of different framework search paths but each framework is in a different folder, not one framework folder. This is my podfile:
我一直在查找与此 Xcode 错误有类似/相同问题的每个网站,我已经尝试了所有方法,但没有任何效果。大多数人说清理和构建项目将使 Firebase 得到认可,但这并没有奏效。我尝试了一堆不同的框架搜索路径,但每个框架都在不同的文件夹中,而不是一个框架文件夹中。这是我的 podfile:
# Uncomment this line to define a global platform for your project
platform :ios, '9.0'
target 'Target' do
# Comment this line if you're not using Swift and don't want to use dynamic frameworks
use_frameworks!
# Pods for Target
target 'TargetTests' do
inherit! :search_paths
pod 'Firebase', '>= 2.5.0'
# Pods for testing
end
end
i've tried making my framework search path $(SRCROOT) and all variations and nothing works. My issue seems to be unlike any other that I can find from googling. I suspect its the framework search path but i don't know what to make it, and I could be wrong.
我试过让我的框架搜索路径 $(SRCROOT) 和所有变体都不起作用。我的问题似乎与我从谷歌搜索中可以找到的任何其他问题不同。我怀疑它是框架搜索路径,但我不知道该怎么做,而且我可能是错的。
Any help would be greatly appreciated.
任何帮助将不胜感激。
回答by Dershowitz123
# 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 Promposal
target 'Promposal' do
pod 'Firebase', '>= 2.5.0'
# Pods for testing
target 'PromposalTests' do
inherit! :search_paths
pod 'Firebase', '>= 2.5.0'
end
end
You were writing your podfile
properly and you were adding the Firebase
only to the test
. Try this podfile
and check.
您正在podfile
正确地编写您的文件,并且您正在将Firebase
唯一的添加到test
. 试试这个podfile
并检查。
回答by gandhi Mena
It was good for me:
这对我有好处:
platform :ios, '10.0'
use_frameworks!
def shared_pods
pod 'Firebase'
end
target 'TargetName' do
shared_pods
end
target 'TargetNameDev' do
shared_pods
end