Search code examples
iosfacebook-ios-sdkfbsdkfbsdkloginkit

FBSDKLoginKit breaks after pods installation


After installing FBSDKLoginKit through CocoaPods, I get the build errors

No known class method for selector 'areAllPermissionsReadPermissions:'

No known class method for selector 'areAllPermissionsPublishPermissions:'

both located in /Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginManager.m. FBSDKCoreKit is also installed through CocoaPods.

What I have checked is the following:

  • FBSDKLoginKit does get added to the frameworks folder
  • It has the correct target membership
  • It is included in Link Binary With Libraries
  • I can import FBSDKLoginKit/FBSDKLoginKit.h without getting an error

Has anyone seen this before?


Solution

  • Egist was right, my problem was inconsistent versions of the different SDKs. My Podfile specified

    pod 'FBSDKCoreKit'
    pod 'FBSDKLoginKit'
    

    and for some reason, this resulted in these frameworks being installed:

    FBSDKCoreKit  - 4.8.0
    FBSDKLoginKit - 4.10.0
    

    Obviously, the way out of this was to specify the versions:

    pod 'FBSDKCoreKit', '~> 4.10.0'
    pod 'FBSDKLoginKit', '~> 4.10.0'