3

There are many questions surrounding the following exception:

no visible @interface for 'FBSDKLoginManager' declares the selector 'logInWithReadPermissions:fromViewController:handler:

Which leads me to think it is less related to FB's SDK but is actually some stupid Xcode technical issue. I'm not missing anything implementation-wise, so what could this pertain to? I've cleared my Pod cache and reinstalled the respective Pods which didn't affect anything.

Xcode exception

Any direction would be much appreciated.

John Doe
  • 3,559
  • 15
  • 62
  • 111

4 Answers4

4

Faced with same issue and changed

Remove this: logInWithReadPermissions

Use this: logInWithPermissions

enter image description here

Suraj Mirajkar
  • 1,369
  • 10
  • 23
1

I was using FBSDK 5.5 and encountered the same error. By going back to my previous version (4.35.0), my app started building fine again.

You can force a particular version in your Podfile:

#pod 'react-native-fbsdk', :path => '../node_modules/react-native-fbsdk'
pod 'FBSDKCoreKit', '~> 4.35.0'
pod 'FBSDKLoginKit', '~> 4.35.0'
pod 'FBSDKShareKit', '~> 4.35.0'
RavenMan
  • 1,807
  • 1
  • 15
  • 27
0

TL;DR: Removing references and deleting files are two different things...

Similar issue: https://stackoverflow.com/a/10744258/648865

There's a duplicate file somewhere in the project! Go hunt it down and destroy it mercilessly!

Community
  • 1
  • 1
John Doe
  • 3,559
  • 15
  • 62
  • 111
0

I was using FBSDK 6.5.2 and encountered the same error.Checked the Facebook documentation and found no solution to the problem, then tried to look at some definitions of the FBSDKLoginManager header file, found the following method, I solved the problem, I recommend trying this method if necessary.

[_loginManager logInWithPermissions:@[@"public_profile", @"user_friends"]
                 fromViewController:nil
                            handler:^(FBSDKLoginManagerLoginResult * _Nullable result, NSError * _Nullable error) {
                                //your code for handle loginResult
                            }];
Bingerz
  • 1,027
  • 1
  • 11
  • 15