'"No such module 'Firebase'" when add Firebase into a library
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?
Solution 1:[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:[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:[3]
Do you open the workspace file after installed with cocoa pods ?
Check if the library is added in "Linked Frameworks" or "Embedded Binaries"
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:[4]
tried all these.. I was stuck in this situation for more than 2weeks.
finally resolved by adding "excluded architectures = arm64"
Solution 5:[5]
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
Solution 6:[6]
For me I had to change the version specified in the Podfile as it was above what my app supported. Specifically in the Podfile I changed: 'platform :ios, '11.0'
to platform :ios, '10.0' which corresponds with Deployment Info in the General Tab for my app I'm working on.
Solution 7:[7]
For Flutter folks adding Firebase to their apps, make sure you follow the steps in Add Firebase to your iOS Project as well as those in the SDK setup steps in the Firebase Console:
In summary:
Run
pod init
if you don't have a pod fileAdd the necessary pods to the bottom of the podfile. All possible Firebase pods can be found here.
pod 'Firebase/Analytics' pod 'Firebase/Firestore' pod 'Firebase/Auth' pod 'Firebase/Storage'
Run
pod install
Solution 8:[8]
Solution 9:[9]
It is because you don't have added pod dependency in Podfile.
you will find below line in Podfile
Uncomment this line to define a global platform for your project #platform :ios, '9.0'
follow the below steps.
1)just remove the # .so it will be like.
platform :ios, '9.0'
2)add the below dependencies.(Do not add all ,you just need to add whatever used in you app ,if you have used Firebase/Core only then add that line only)
#Pods for app name
pod 'Firebase'
pod 'Firebase/Core'
pod 'Firebase/Auth'
pod 'Firebase/Database'
3)clean the build
flutter clean
4)run Command :
flutter run (It will automatically adds a required pods).
that's it.
Solution 10:[10]
The same thing happened to me last week. I solved it by:
1. pod deintegrate
2. Open Xcode and delete any instance of pod.
3. pod install
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow