roughike / flutter_facebook_login

A Flutter plugin for allowing users to authenticate with native Android & iOS Facebook login SDKs.
BSD 2-Clause "Simplified" License
405 stars 331 forks source link

Xcode 10.2.1 build error #120

Open mis0025033 opened 5 years ago

mis0025033 commented 5 years ago

The project is work fine in Android, but it get error when i build the same project in xcode. I am using flutter_facebook_login 1.2.0

Following are the errors

/Users/builder/clone/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.m:148:31: error: no known class method for selector 'extractPermissionsFromResponse:grantedPermissions:declinedPermissions:'

 [FBSDKInternalUtility extractPermissionsFromResponse:permissionResult
                       ^~~~~~~~~~~~

/Users/builder/clone/ios/Pods/FBSDKLoginKit/FBSDKLoginKit/FBSDKLoginKit/FBSDKDeviceLoginManager.m:151:67: error: no visible @interface for 'FBSDKAccessToken' declares the selector 'initWithTokenString:permissions:declinedPermissions:appID:userID:expirationDate:refreshDate:dataAccessExpirationDate:'

 FBSDKAccessToken *accessToken = [[FBSDKAccessToken alloc] initWithTokenString:tokenString
                                  ~~~~~~~~~~~~~~~~~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

2 errors generated.

amao commented 5 years ago

same problem. just solved that.

  1. edit flutter_facebook_login.podspec in .pub-cache directory , change the content to be following: s.dependency 'FBSDKLoginKit', '4.39.1' s.dependency 'FBSDKCoreKit', '4.39.1' #<---add this, keep the same version with loginkit
  2. pod update FBSDKLoginKit
  3. pod deintegrate
  4. pod install
mis0025033 commented 5 years ago

Hi Amao, Thank you for your solution, it works!!!

danysz commented 5 years ago

+1

patrick-fitzgerald commented 5 years ago

It looks like this PR should fix the issue - https://github.com/roughike/flutter_facebook_login/pull/124

Anuraag93 commented 5 years ago

@amao where i can find this flutter_facebook_login.podspec so i can edit this file for me too.

E-Franco commented 5 years ago

@Anuraag93 .pub-cache can be found inside Flutter directory as a hidden folder. There you will find flutter_facebook_login files as well the .podspec one.

jeeali commented 5 years ago

I am able to find flutter_facebook_login.podspec.json! Should I append the file? with: s.dependency 'FBSDKLoginKit', '4.39.1' s.dependency 'FBSDKCoreKit', '4.39.1' Please guide.. @amao , @E-Franco @mis0025033

E-Franco commented 5 years ago

@jeeali the related bug was fixed on version 2.0.1. I suggest you to update your pubspec. But if you still in earlier versions, make sure to set LoginKit and CoreKit to same version (4.39.1).