Running react-native link after upgrading to react-native-fbsdk 0.6.1 throws error:
[...]
rnpm-install info Linking react-native-fbsdk ios dependency
rnpm-install ERR! Something went wrong while linking. Error: Expected "/*", "//", or "{" but "<" found.
Please file an issue here: https://github.com/facebook/react-native/issuesExpected "/*", "//", or "{" but "<" found.
Install react-native-fbsdk 0.6.1, remove node_modules and reinstall packages, then run react-native link
This answer worked for me
https://github.com/facebook/react-native/issues/10032#issuecomment-309087710
Indeed it works fine with version 0.6.0 . The issue I raised comes with version 0.6.1, and btw, none of the proposed solutions in your link work for 0.6.1
@koenpunt made a pull request to fix this problem:
https://github.com/facebook/react-native-fbsdk/pull/349
This is not a bug in react-native - it's a really old known issue with CocoaPods and latest react-native-fbsdk commits trigger it by using more modern project.pbxproj format.
I think there's no reason to track it in the RN repository as the root cause and possible workarounds are isolated inside either cocoapods or rnfbsdk.
react-native install react-native-fbsdk would fail. Best clean up / recovery I use is:
react-native unlink react-native-fbsdk
to clean up any previously failed link attempts.yarn add react-native-fbsdk
open node_modules/react-native-fbsdk/ios/ios.xcodeproj/
- this launches XCodeless node_modules/react-native-fbsdk/ios/ios.xcodeproj/project.pbxproj
to make sure the file is no longer XML.react-native link react-native-fbsdk
@paulftw where is that "Use Release for command-line builds" Xcode setting located at?
@atom-r here's a screenshot
@paulftw Thanks! it worked!
@paulftw hey it worked but after I installed yarn and did what you said I ran npm install to install another package and it removed all my node_modules and the application is not running anymore =// what causes this, do you know it?
@paulftw it worked for me too. Thanks!!!!
@paulftw you're awesome!
@barakoles when npm or yarn rewrite or remove node_modules you have to convert .pbxproj to old format again, as per the steps I've provided above. But overall it's a hack, not a proper permanent fix, so projects will keep breaking again and again until rn-fbsdk get their act together (or cocoapods for that matter)
Many people have asked them to do that here: https://github.com/facebook/react-native-fbsdk/pull/349
@paulftw that really helped thanks!!!
paulftw's comment (July 17) solved this for me. It's unbelievable that the Facebook integration for a facebook-originated project (react native) is in this state. One would think facebook's highest priority would be making sure integration of their framework/services was functional.
I would also like to note that not all mobile developers have mac (with Xcode). For example, in order to develop applications for android enough to have a linux PC. Nevertheless, this error breaks their library linking.
It may help someone to know they need to click the standard editor icon in the right panel.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Maybe the issue has been fixed in a recent release, or perhaps it is not affecting a lot of people. If you think this issue should definitely remain open, please let us know why. Thank you for your contributions.
Most helpful comment
This is not a bug in react-native - it's a really old known issue with CocoaPods and latest react-native-fbsdk commits trigger it by using more modern project.pbxproj format.
I think there's no reason to track it in the RN repository as the root cause and possible workarounds are isolated inside either cocoapods or rnfbsdk.
react-native install react-native-fbsdk would fail. Best clean up / recovery I use is:
react-native unlink react-native-fbsdk
to clean up any previously failed link attempts.yarn add react-native-fbsdk
open node_modules/react-native-fbsdk/ios/ios.xcodeproj/
- this launches XCodeless node_modules/react-native-fbsdk/ios/ios.xcodeproj/project.pbxproj
to make sure the file is no longer XML.react-native link react-native-fbsdk