How to fix build error with FBSDKLoginKit in Xcode

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.


I have similar issue. It is after installing FBSDKCoreKit 5.0.0 (was 4.44.1) as part of the Firebase codebase.

It seems that there may be some code that Firebase use:

  • (void)addLoggingExtra:(id)object forKey:(id)key { [FBSDKInternalUtility dictionary:_mutableLoggingExtras setObject:object forKey:key]; }

That seem to be problematic and gives the error: No known class method for selector 'dictionary:setObject:forKey:'

While I don't know how to solve it, the above may provide insights to others.


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.