"No such module 'Firebase'" when add Firebase into a library

27,913

Solution 1

You need to add the follwing to your POD file:

pod 'Firebase'

After that, you need to type in your terminal

pod install (to refresh the pod file)

Solution 2

I solve my problem using just the specific import that I'm using, for example. In my SDK I'm using FirebaseCore and FirebaseAnalytics. Into my class I just import:

import FirebaseCore
import FirebaseAnalytics

And in my .podspec I needed to set static_framework property to true, so my .podspec it's seems like code below:

s.static_framework = true

s.dependency 'Firebase'
s.dependency 'Firebase/Core'

It works for me!

Solution 3

Do you open the workspace file after installed with cocoa pods ?

Check if the library is added in "Linked Frameworks" or "Embedded Binaries"

enter image description here

If it didn't work, add this pod file

platform :ios, '8.0' use_frameworks! target ‘Your Project’ do


pod 'Firebase', '>= 2.5.1'
pod ‘Firebase/Auth’
pod ‘Google/SignIn’
pod ‘Firebase/Database’
pod 'Firebase/Storage' end

and then type pod deintegrate and after that run pod install.

Solution 4

Hi today i fix same problem 1 : open podfile from xcode than add " pod 'Firebase' " save and close it 2 : open vscode or any editor using, open new terminal than write " cd ios " to open ios file than " pod install " when you install it showing problem need to add search path so now open ios file from xcode and go to : runner > target runner > build settings > all > search paths and add this " $(inherited) " into framework search path and header search path that's all

Share:
27,913
Tai Le
Author by

Tai Le

I'm an iOS developer, no, I was a follower of the technology, I am passionate about new technologies, I want to experience, want to know how they operate, how do I have could build such a technology. With three years of experience with iOS programming, not too much time, but with what I learned, it's not only the iOS development, UI/UX, Design Pattern, database, DRY, client - server models, clean code, etc, it's the way of programming thinking, and especially the process to produce an application. A executing application that is not enough, it have to easy to understands, maintains, changes, and develops new features. Applications must also focus on user experiences and listens to the feedback from customers is also very important thing. With 4 startup projects, and 3 projects of their own, but I think it's not enough, still a toddler in the trade, I am ready for next challenges and milestones in my life…

Updated on January 12, 2022

Comments

  • Tai Le
    Tai Le over 2 years

    I just created new Framework and added Firebase via CocoaPods, when combine the library it success.

    But when I add that library to other project via CocoaPods as well, then combine that project, and it raise an error: No such module 'Firebase'

    Anyone faced a problem like this?

  • Bram'in
    Bram'in almost 8 years
    Click on .xcodeproj in hierarchy and try to linked the right embedded library.
  • Bram'in
    Bram'in almost 8 years
    Bad. Show me your podfile ?
  • Tai Le
    Tai Le almost 8 years
    source 'github.com/CocoaPods/Specs.git' platform :ios, '8.0' use_frameworks! inhibit_all_warnings! target 'FirebaseAPI' do pod 'Firebase' pod 'Firebase/Core' pod 'Firebase/Crash' pod 'Firebase/Auth' pod 'Firebase/Database' end
  • Rookie
    Rookie over 4 years
    This worked for me, I was using Xcode 10.2 and upgraded to 10.3 and Firebase needed update
  • Talha Chafekar
    Talha Chafekar over 3 years
    Thanks a lot! The command which you mentioned should be pod deintegrate instead of pod -reintegrate
  • Kateridzhe
    Kateridzhe about 2 years
    Yep, that worked for me. Thanks. Btw to find this info in the project, select the project name (top line) in the navigator on the left
  • Максим Мартынов
    Максим Мартынов about 2 years
    Thank you! I waste half of the day solving that problem!