My ios app was working fine until I ran "pod install" and updated all of my pods. I'm now getting an error when trying to build in Xcode.
FBSDKLoginKit/FBSDKLoginManagerLoginResult.m:43:25: No known class method for selector 'dictionary:setObject:forKey:'
Here are the FB pod versions used:
Installing FBSDKCoreKit (5.0.0)
Installing FBSDKLoginKit (4.44.1)
Those are not specified in my podfile. I think they're installed as part of FirebaseAuth which is in my podfile.
How can I resolve this?
If you run your app and you get some build errors, that means Xcode has detected that the syntax of your code is wrong. If Xcode is complaining that a specific identifier doesn’t exist, then check that all of your opening curly braces have corresponding closing curly braces.
After the crash, go to Xcode in the lower right hand pane, scroll all the way to the top. So now that you know how to find the actual error message when your app crashes, the next step is to learn to recognize some of the more common types of messages because they will hint at what’s wrong.
My Xcode Interface Is Different 1. Xcode Simulator Errors My iPhone simulator looks different? If your iPhone simulator doesn’t look like the one you see me using in my videos, it’s because your iOS simulator is at a different zoom level.
You will often see this error if Xcode cannot find the variable or property you are referring to. “Unresolved” means that Xcode couldn’t find something, and “identifier” is another word for a variable, property, function name, etc. Here are several reasons why you could receive this error:
Add pod 'FBSDKCoreKit', '~> 4.44'
to the Podfile.
There's a bug in the 4.x versions of FBSDKLoginKit
. Its podspec allow major version updates to its FBSDKCoreKit
dependency, but the code doesn't comply.
There's no FBSDKCoreKit version specified in the 4.44.1 version like there is in the 5.0.0 version.
The suggested Podfile change is a workaround for the podspec problem.
The current version of FirebaseUI requires version 4.x of FBSDKLoginKit.
In my case, I had to also fix the version of Firebase/Core
, like following.
pod 'FBSDKCoreKit', '~> 4.35'
pod 'FBSDKLoginKit', '~> 4.35'
pod 'Firebase/Core', '~> 5.20'
Additionally information
The above case is that you have FirebaseUI/Twitter
for Twitter login, which is using TwitterKit internally. But TwitterKit is finished to support. So if you have already used FirebaseUI/Twitter, the following should be used
pod 'FirebaseUI/OAuth'
instead of the below.
pod 'FirebaseUI/Twitter'
At the result, we can use the latest & stable FBSDKCoreKit, FBSDKLoginKit and Firebase/Core.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With