简体   繁体   English

在Xcode(Swift)中没有这样的模块'Firebase'

[英]no such module 'Firebase' in Xcode (Swift)

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. 我一直在查找与此Xcode错误有类似/相同问题的每个网站,我已尝试过所有内容,但没有任何工作。 Most people say cleaning and building the project will make Firebase recognized but that hasn't worked. 大多数人说清理和构建项目将使Firebase得到认可,但这并没有奏效。 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: 这是我的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

these are my project folders 这些是我的项目文件夹

i've tried making my framework search path $(SRCROOT) and all variations and nothing works. 我已经尝试制作我的框架搜索路径$(SRCROOT)和所有变化,但没有任何作用。 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. 我怀疑它的框架搜索路径,但我不知道该怎么做,我可能是错的。

Any help would be greatly appreciated. 任何帮助将不胜感激。

# 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 . 您正在正确编写podfile并且仅将Firebase添加到test Try this podfile and check. 试试这个podfile并检查。

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM