简体   繁体   中英

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. 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:

# 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. 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 . Try this podfile and check.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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