Hey there,
I'm trying to install react-native-fbsdk v0.2.0 and getting errors with iOS FB SDK:
node_modules/react-native-fbsdk/iOS/RCTFBSDK/core/RCTFBSDKAppEvents.h:21:9: 'FBSDKCoreKit/FBSDKCoreKit.h' file not found. Sometimes I see errors about ShareKit.
I'm trying this in brand new project with RN v0.26.1.
My package.json
"dependencies": {
"react": "^15.0.2",
"react-native": "^0.26.1",
"react-native-fbsdk": "^0.2.0"
}
This is screenshot of rnpm succeed

Screenshots of project:



Could you please help figure out what's wrong.
This is b/c build target RCTFBSDK is set to search framework in ~/Documents/FacebookSDK so it doesn't know about the SDK in $(PROJECT_DIR)/elibs/FacebookSDK.
There're two ways to solve this,
~/Documents/FacebookSDK and put the iOS SDK there.$(PROJECT_DIR)/elibs/FacebookSDK.@dzhuowen it's quite weird decision to get rid of cocoapods. What decided it?
Now every developer should place libs somewhere in ~/ or change path to fb sdk in lib settings. $(PROJECT_DIR)/elibs/FacebookSDK doesn't work, cause $(PROJECT_DIR) leads to node_modules/ directory.
Thanks for response, @dzhuowen!
The reason we drop support for cocoapods is b/c 1) rnpm is more popular in the react-native community and the setup is much easier comparing to cocoapods. For example, no more creating pod file, removing static libraries from xcode project files and linker flag setup; 2) If the developer doesn't use cocoapods at the early stage, it's hard to switch to using it, especially for projects with additional dependencies.
If you put the iOS SDK in a fixed location like ~/Documents/FacebookSDK, you can use this sdk for all you react-native projects without keeping multiple copies of the SDK in your local, right?
@dzhuowen , You're aware that your decision to depend on code _outside_ of the source code tree now means:
This design seems to violate a number of software engineering best practices.
Yes, rnpm is great, and I use both it and CocoaPods in my project. My attempt at debugging why the compiler said 'quote' wasn't found in FBSDKShareLinkContent, proved very difficult, as I had assumed all code dependencies would be inside my source tree. (Turns out, I had a very old version of FacebookSDK installed in my ~/Documents directory from last year, and I had no idea I was depending on it.)
I suspect you'll need to find a better solution to this problem, as these kinds of complaints are going to become worse as more people run into this. You could include the FB SDK inside react-native-fbsdk itself. Or you could have react-native-fbsdk depend on a dummy fbsdk npm that contains the FB code, which could be updated independently. I personally liked the CocoaPods approach of having a numbered version FB SDK that I was referencing from a Podfile.lock that guaranteed reproducible builds....but if you don't want CocoaPods, I'll leave it to you to figure out a better solution that doesn't have all of the problems I mentioned above.
I'm using cocoapods too, how do I link rn fbsdk to my pods?
@dzhuowen I also agree that ~Documents is not the right place. If you work in a team do you ask everyone to install FBSDK in their Documents directory, also what if I need different versions of the SDK for different projects? I would just expect to git clone the project and start working with it.
Totally agree with @mikelambert @knowbody
I used cocoapods and CI server. How you guys imagine people should manually install fb sdk in home directory on CI server every time?
It's better to create new issue to discuss this. This library is for people, so let's be in touch with other developers who are using this library.
Great points, I'm going to move this conversation to https://github.com/facebook/react-native-fbsdk/issues/181 as I think the specific report was fixed for @mtven
Most helpful comment
@dzhuowen , You're aware that your decision to depend on code _outside_ of the source code tree now means:
This design seems to violate a number of software engineering best practices.
Yes, rnpm is great, and I use both it and CocoaPods in my project. My attempt at debugging why the compiler said 'quote' wasn't found in FBSDKShareLinkContent, proved very difficult, as I had assumed all code dependencies would be inside my source tree. (Turns out, I had a very old version of FacebookSDK installed in my ~/Documents directory from last year, and I had no idea I was depending on it.)
I suspect you'll need to find a better solution to this problem, as these kinds of complaints are going to become worse as more people run into this. You could include the FB SDK inside react-native-fbsdk itself. Or you could have react-native-fbsdk depend on a dummy fbsdk npm that contains the FB code, which could be updated independently. I personally liked the CocoaPods approach of having a numbered version FB SDK that I was referencing from a Podfile.lock that guaranteed reproducible builds....but if you don't want CocoaPods, I'll leave it to you to figure out a better solution that doesn't have all of the problems I mentioned above.