Skip to content
This repository has been archived by the owner on Apr 2, 2021. It is now read-only.

Update iOS RN header paths #322

Merged
merged 2 commits into from
Jan 9, 2017
Merged

Conversation

janicduplessis
Copy link
Contributor

@janicduplessis janicduplessis commented Dec 1, 2016

facebook/react-native@e1577df moves header imports to <React/*>. This updates header include path and all imports so build works against react master (soon to be version 0.40.0).

TODO: Fix / update sample when 0.40 is out.

@radko93
Copy link

radko93 commented Dec 5, 2016

The change already exists in 0.39, maybe we should merge it now?

@janicduplessis
Copy link
Contributor Author

The change is only part of 0.40 according to tags on facebook/react-native@e1577df. There was a bit of discussion around it and seems like the change to header paths won't be needed anymore but all imports will still need to be updated. Will update this PR once this is settled.

Also take note that this change is NOT backwards compatible sadly so we have to depend on RN 0.40+ after merging this.

@jpapillon
Copy link

@janicduplessis I'm trying to migrate to 0.39.2, but I can't because this hasn't been merged yet. Any plans on merging it soon? Thanks!

@facebook-github-bot
Copy link

@janicduplessis updated the pull request - view changes

@janicduplessis
Copy link
Contributor Author

@jpapillon Are you sure this is needed for 0.39? According to the tags on the github commit this is only part of 0.40 facebook/react-native@e1577df

@ptomasroos
Copy link
Contributor

We're facing same issue. Unable to run current version on 0.39 but Your branch works on 0.39. Gave it 2h to try to understand it. Makes no sense at all. 😳

@jpapillon
Copy link

@janicduplessis 0.39.2, yes. Works fine on 0.38!

@Andreyco
Copy link

RnFbSDK is not working on 0.39.2.
Works good on 0.39.0 though

@danieldkim
Copy link

Hi, RN 0.40.0 has been released. Any plans to merge this and push out a new distro?

@nicolabortignon
Copy link

nicolabortignon commented Jan 6, 2017

@dzhuowen Please can someone merge this?
Now that RN 0.40.0 is out this is becoming more and more urgent.

Thanks!

@Amurmurmur
Copy link

Guys do you experience the same thing? AccessToken.getCurrentAccessToken() returns null after application restart, even tho it returns valid access token after a successful login.

@danieldkim
Copy link

fwiw, installing the package from @janicduplessis's fork works for me. i'm only using the login functionality but in principle everything else should work as well as there haven't been any changes since the 0.4.0 release and all this PR does is update the import statements to work with RN 0.40.0.

@Amurmurmur
Copy link

Did you use LoginManager? And than check AccessToken to check for its existence on application boot. Though react-native-facebook-login with its' default login button also resets to Login state after app restart. Would so much appreciate if you can help.

@monzerhijazi
Copy link

+1 please merge

@Amurmurmur
Copy link

AccessToken is null after app restart - thats the bug of Facebook SDK 4.18, switched to 4.17 and everything works like a charm :) Hope that helps everyone else who came to the same issue.

@dzhuowen dzhuowen merged commit 1827bc4 into facebookarchive:master Jan 9, 2017
@dzhuowen
Copy link
Contributor

dzhuowen commented Jan 9, 2017

Thanks for the PR! We'll release a new version soon.

@christiangenco
Copy link

For the impatient, you can install the latest version with this fix from github right now with:

react-native install "facebook/react-native-fbsdk"

This will write to your package.json file:

"react-native-fbsdk": "github:facebook/react-native-fbsdk"

(you'll probably want to react-native uninstall react-native-fbsdk to uninstall and unlink the currently released version)

I also had to manually run react-native link react-native-fbsdk, then remove and re-add LIBRCTFBSDK.a from Build Phases/Link Binary With Libraries in XCode.

@kurtfunai
Copy link

Thank you @christiangenco! Huge help.

@jpapillon
Copy link

Thanks @dzhuowen! Can't wait for the new release! :)

@geniusgordon
Copy link

Thanks for the PR!
When can we get the new version on npm?

@hramos
Copy link
Contributor

hramos commented Jan 18, 2017

The new version should be published to npm later this week.

@antonsivogrivov
Copy link

I have FBSDKCoreKit/FBSDKCoreKit.h file not found error and spent several hours trying to solve it, but can't understand whats going wrong((

Any ideas?

react-native 0.40
react-native-fsdk 0.5.0

@Amurmurmur
Copy link

Amurmurmur commented Feb 3, 2017

Try on of the following:

  1. Check if you did react-native link on your RN project
  2. Manually check in Linked Frameworks And Libraries, that you have libRCTFBSDK.a if not, hit that + button at the bottom and link it.
  3. When upgrading the project itself react-native from <0.40 make sure you ran react-native upgrade after you've updated the RN package itself with npm install react-native@latest --save, because somethings might be changed in the linking and other project settings, and obviously the change in the header paths.
  4. Try:
rm -rf ./node_modules
watchman watch-dell-all
npm cache clean
npm install
react-native run-ios/run-android

Hopefully it helps

@antonsivogrivov
Copy link

@Amurmurmur, now I have Undefined symbols for architecture x86_64:
"OBJC_CLASS$_FBSDKHashtag", referenced from:
objc-class-ref in libRCTFBSDK.a(RCTConvert+FBSDKSharingContent.o) error.

God damn, I can't build fbsdk a couple of days!((

@Amurmurmur
Copy link

@tonygriv Have you imported necessary frameworks from the FacebookSDK folder into the xcode project?
This ones:
screen shot 2017-02-04 at 23 14 35

@antonsivogrivov
Copy link

Yes.
screen shot 2017-02-04 at 23 16 12

@teloconf
Copy link

RCTFBSDKInitializer.m:22:9: fatal error: 'FBSDKCoreKit/FBSDKCoreKit.h' file not found
#import <FBSDKCoreKit/FBSDKCoreKit.h>

"react-native": "0.41.2",
"react-native-fbsdk": "^0.5.0"

Any Idea?
Thanks

@teloconf
Copy link

SOLVED!

1.- react-native uninstall react-native-fbsdk
2.- Remove Facebook Frameworks from XCode
3.- Add Facebook Frameworks from XCode
4.- react-native install react-native-fbsdk
5.- react-native link react-native-fbsdk

@teloconf
Copy link

Solution 2:
XCode -> Project Navigator -> Libraries -> RCTFBSDK.xcodeproject -> Frameworks -> Delete the files and copy the same as in the Frameworks folder of the project root except Bolts.framework

@VGamezz19
Copy link

VGamezz19 commented Feb 24, 2018

Hello there!
There is a similar problem but with RCTFBLoginButton
Do you think it is by the FBSDK or by RN?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.