facebookarchive / react-native-fbsdk

A React Native wrapper around the Facebook SDKs for Android and iOS. Provides access to Facebook login, sharing, graph requests, app events etc.
https://developers.facebook.com/docs/react-native
Other
2.99k stars 908 forks source link

No visible @interface for 'FBSDKAccessToken' declares the selector 'initWithTokenString:permissions:declinedPermissions:expiredPermissions:appID:userID:expirationDate:refreshDate:dataAccessExpirationDate:' #605

Closed khanhphamqn closed 5 years ago

khanhphamqn commented 5 years ago

🐛 Bug Report

Fresh install package and working on iOS build fails with:

No visible @interface for 'FBSDKAccessToken' declares the selector 'initWithTokenString:permissions:declinedPermissions:expiredPermissions:appID:userID:expirationDate:refreshDate:dataAccessExpirationDate:'

To Reproduce

-npm install react-native-fbsdk -react-native link react-native-fbsdk -download and unzip FacebookSDKs-iOS-4.40.0 -From the Facebook SDK folder, drag the folder Bolts.framework, FBSDKCoreKit.Framework, FBSDKLoginKit.Framework, FBSDKShareKit.Framework into your Xcode Projects Framework folder. -Open Xcode's "Build Settings" tab in your project and add the Facebook SDK folder's path to "Framework Search Paths" setting. -And follow all steps from this link https://developers.facebook.com/docs/facebook-login/ios/?sdk=fbsdk -Use xcode to build and the result will throw this issue

Screen Shot 2019-07-25 at 2 57 18 PM

Expected Behavior

Successful build

Environment

react: ^16.8.6 react-native: 0.59.9 react-native-fbsdk: ^0.10.1 Xcode Version 9.4.1 (9F2000)

eliasassuncao commented 5 years ago

same problem!

Ankushds commented 5 years ago

ssame also here. entire library is mesh.

m-tymchyk commented 5 years ago

I have the same problem.

react: 16.8.6
react-native: 0.59.5
react-native-fbsdk: 0.10.1

Xcode Version 10.2.1 (10E1001)
edicarloslds commented 5 years ago

You need to update the Facebook SDK to v5. release notes: https://github.com/facebook/react-native-fbsdk/releases/tag/0.10.0

khanhphamqn commented 5 years ago

@edicarloslds Thanks you. I solved this issue thanks to Facebook SDK v5.3.0. it just released 2 days ago https://github.com/facebook/facebook-objc-sdk/releases/tag/v5.3.0 by downloading the static one and overwrite the files in folder FacebookSDKs-iOS-4.40.0. and make sure you have to clear cache before build it again.

So I closed this issue. Thanks for all of you

blueneel05 commented 5 years ago

I am still getting this issue. I followed the installation instructions using cocoapods. Where do I put files downloaded from https://github.com/facebook/facebook-objc-sdk/releases/tag/v5.3.0 ??

khanhphamqn commented 5 years ago

@blueneel05 Here is example of react native facebook you can download for reference. That I just created without cocoapods https://github.com/khanhphamqn/loginFacebook with cocopods https://github.com/khanhphamqn/loginFacebookUseCocoapods

hope you enjoy it

witalobenicio commented 4 years ago

@khanhphamqn where did you get the frameworks to work without cocoa pods?

khanhphamqn commented 4 years ago

@witalobenicio , you can access this link https://github.com/khanhphamqn/loginFacebook in IOS folder there is a Frameworks folder that' what you need. Otherwise, Please follow this intruction https://developers.facebook.com/quickstarts/2269210073319606/?platform=ios and download the latest release at https://github.com/facebook/facebook-ios-sdk/releases and overwrite it

witalobenicio commented 4 years ago

@khanhphamqn but in https://github.com/facebook/facebook-ios-sdk/releases we don't have the .framework anymore.

witalobenicio commented 4 years ago

@khanhphamqn I'm asking because I need to find a way to get those files in my CI/CD process.

khanhphamqn commented 4 years ago

@witalobenicio You'd better download the FacebookSDK_Static.zip and unzip it

witalobenicio commented 4 years ago

@khanhphamqn thanks :)

witalobenicio commented 4 years ago

@khanhphamqn do you have any clue why my project isn't working on release mode? I've followed your tip to get from FacebookSDK_Static.zip and tried locally, and everything was just fine. But when I try on release, the app crashes and gives me the error of this issue.

khanhphamqn commented 4 years ago

@witalobenicio. I am not sure but I guess one reason. Could you please screenshot of IOS folder and Framework Search Path in Build Settings and share it to me?