Yesterday I cleared the Derived data folder enitrely and started facing this error.
I tried :
Clearing Derived Data and Clean and rebuild
Deleting all pods using pod deintegrate and reinstall using pod install
Deleting the Podfile.lock file
Run pod update to update the pods
My podfile contains these Firebase pods:
pod 'Firebase/Core'
pod 'Firebase/Messaging'
pod 'Firebase/Firestore'
pod 'Firebase/Database'
But the error still remains. Anyone faced this error lately.
Simply explicitly import 'FirebaseMessaging' in your project, I had to call it explicitly to make it work.
import FirebaseMessaging
Open your project, in Project Navigator click on Pods.xcodeproj and in a targets list check if your pod is installed. If it is not then pods are not installed properly or Firebase might removed it because it was deprecated.
Related
I know this has been answered previously on Stack.
I am currently running Xcode Version 13.4.1 and using cocoapods-1.11.3 but I got that error and I was trying another solution to change the cocoapods to 1.10.2 based on the https://stackoverflow.com/a/63648164/556617 and still getting this error.
I have done the usual steps to see if the following will solve the issue;
Cleaned Build Folder
Removed derived data
Restarted Xcode
I believe this is a module pulled in along with Firebase/Firestore
pods used:-
pod 'Firebase/Auth'
pod 'Firebase/Messaging'
pod 'Firebase/Analytics'
pod 'FirebaseFirestoreSwift'
pod 'Firebase/Database'
pod 'Firebase/Crashlytics'
and more with came along Firebase
I am trying to login with Firebase Google Login. After installing the pods when i import header file
'GoogleSignIn' it gives me an error.
No such module 'GoogleSignIn'
Here is my pod file
I also tried different troubleshoot methods like
update pods
Restarted Xcode
But none of methods did work for me. How i fix this issue
Maybe you can fix that by cleaning the build with cmd+shift+k and removing the derived data(xcode->preferences->location->derived_data_folder and remove the derived data folder).
If the above process didn't work then reinstall the pods.
pod deintegrate
pod cache clean --all
pod install
I think #muhammad-qais answer will work. If not try removing the text "pod 'GoogleSignIn', '~> 3.0' " in podfile.
Then pod install. It removes the existing google Sign in pod.
And then install google sign in Pod from cocoapods.org as usual.
Hope it works.
I have been looking up on every website that had a similar/identical to this specific issue for Xcode of earlier version errors and I have tried everything and nothing has worked. I have cleaned and then tried to build the project but that hasn't worked.
The terminal shows that the firebase pod has been successfully installed but when try to import firebase the xcode says there is no such module Firebase
Then I tried to use adding the framework manually but when I try to build then Xcode says framework not found firebasecore .
I am stuck there ..what can I do next?
Comment all pods in pod file, then install only
pod 'Firebase/Analytics'
pod 'Firebase/Messaging'
For firebase notifications, because some time xcode do not install frameworks of pod files.
Open your pod file from project directory and add this
pod 'Firebase/Core'
then go to terminal and install pod again
pod install
after that make sure you build your project (⌘+B) before use.
Make sure you are opening .xcworkspace file from project directory.
I have ran into a peculiar issue with Xcode 9.2 (9C40b) and Cocoapods 1.3.1. When I try to import the GoogleSignIn framework, Xcode complains:
But there are no other errors throughout the file regarding classes in GoogleSignIn, and when I CMD+Click on a class I can view its header (note the path at the top, which means that the framework definitely exists in my workspace):
As a result, I can still reference types from classes involved in GoogleSignIn wherever I import it, but I am unable to build because Xcode thinks that the framework is missing.
Here's my Podfile. I have ran pod update and I am opening the MyApp.xcworkspace file inside of Xcode.
platform :ios, '10.3'
target 'MyApp' do
use_frameworks!
# Pods for MyApp
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/Auth'
pod 'ActionsList', '~> 0.9.1'
pod 'GoogleAPIClientForREST/Classroom'
pod 'Google/SignIn', '~> 3.0.3'
end
GoogleSignIn is the only framework where this issue arises -- I can use everything else flawlessly, and when I comment out all the code involved with GoogleSignIn (the import statement, all references, etc.) the app builds just fine. I should note that I have been able to successfully import GoogleSignIn in another project with Cocoapods
How can I fix this issue and convince Xcode that the framework exists?
first of all make that pod: pod 'GoogleSignIn'
In your app's project-Bridging-Header.h file, import the Google Sign-In SDK headers: #import <Google/SignIn.h>
GoogleSignInDOcs for more information
The problem could be resolved executing the cd project/directory; pod install in the terminal to analyze, download and install your project dependencies.
My pod file contains:
pod 'Firebase'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'GoogleSignIn'
And it's working.
Good Luck!
Using CocoaPods, I have imported the below frameworks:
platform :ios, '11.0'
use frameworks!
target '{APP NAME}' do
pod 'Firebase'
pod 'Firebase/Auth'
pod 'Firebase/Core'
pod 'Firebase/Database'
pod 'Firebase/AdMob'
pod 'Firebase/Messaging'
pod 'Batch'
pod 'FBSDKLoginKit'
pod 'FBSDKCoreKit'
pod 'Google-Mobile-Ads-SDK'
end
When I build my project, it runs happily on my iPhone with no errors.
When I try to create an Archive of the project, it shows one of the below and refuses to build the project to Archive.
No such module 'FBSDKCoreKit'
No such module 'FBSDKLoginKit'
I have no idea what I'm doing wrong as nothing has changed. I haven't archived in a few months and it's suddenly stopped working.
I've removed and re-installed the Pods but nothing seems to fix the issue.
Even if I remove one of the import statements the other FBSKD seems to fail.
Try this!
pod 'FBSDKCoreKit', '~> 4.10.0'
pod 'FBSDKLoginKit', '~> 4.10.0'
pod 'FBSDKShareKit', '~> 4.10.0'
Please add
pod 'FBSDKCoreKit'
also.
Try to update your pod file like this
pod 'FacebookCore'
pod 'FacebookLogin'
Not sure if you already found an answer but this worked for me, I had the same problem as you, kind of weird but it worked.
I uninstalled the pods 'FBSDKCoreKit', 'FBSDKShareKit', and 'FBSDKLoginKit'
I then installed pods 'FacebookCore' and 'FacebookLogin'
this also installs the previous pods I uninstalled.
When I typed import FBSDKCoreKit in my AppDelegate header I still received an error.
So just for shits and gigs I removed import FBSDKCoreKit and replaced it with import FacebookLogin and there were no errors
I then typed in the necessary code in my AppDelegate file stated in the instructions of Step 5: Connect to AppDelegate (https://developers.facebook.com/docs/ios/getting-started)
I ran the app, the build failed but I went into my AppDelegate file and again, for shits and gigs, typed in import FBSDKCoreKit in the header (without removing import FacebookCore) and there were no errors. Then I removed import FacebookCore from the header and still no errors.
still messing with the syntax to get "Build Successful" but it seems to be heading in the right direction.
I'm new to xCode and Swift, so honestly I'm not exactly sure what I did that was the main reason for the fix but this worked for me. Let me know if this helped!
This error appeared for me when I added a new build-target to my project.
Xcode added this change which caused all the trouble.
- E31B6D4E3385CBFF63FDF655 /* BuildFile in Frameworks */,
+ E31B6D4E3385CBFF63FDF655 /* (null) in Frameworks */,
When I removed the change from my commit history, all worked fine.
I did so with an interactive rebase.
Try this!!
Goto General -> Linked Frameworks and Libraries -> remove Framework.
The actual issue is there is a bug with Xcode wherein it's not recognizing the pods already installed and added to the project. That's why the module not found error during compile time. I am getting the same build error with many other pods afterwards also. It's happening only at times that too unexpectedly. The only way is to build the project multiple times until it recognizes the module and the error is gone. This sounds crazy but no other way so far. Also, Use cmd+B to build your code.