GithubHelp home page GithubHelp logo

Comments (28)

yelled3 avatar yelled3 commented on May 24, 2024 3

@tnguyen42
after reading:
https://github.com/magus/react-native-facebook-login#setup
and
http://facebook.github.io/react-native/docs/linking-libraries-ios.html#here-the-few-steps-to-link-your-libraries-that-contain-native-code

I was able to make it work.
the missing part was part 2:
http://facebook.github.io/react-native/docs/linking-libraries-ios.html#step-2

from react-native-fbsdk.

tnguyen42 avatar tnguyen42 commented on May 24, 2024

+1

Just in case... I dragged the frameworks in, the xcodeproj in, and I put saved the Facebook SDK files in ~Documents/FacebookSDK. But even with that, I still can't make it to work.

from react-native-fbsdk.

yelled3 avatar yelled3 commented on May 24, 2024

I'm still unsure how to add the whole SDK to the project, instead of linking it from ~Documents/FacebookSDK - which seems plain WRONG.

it should either be from a Pod or from the node_modules dir as well - the way react-native-facebook-login are doing it:
https://github.com/magus/react-native-facebook-login#adding-the-facebook-sdk

from react-native-fbsdk.

MossP avatar MossP commented on May 24, 2024

I must be missing something.. where is the node_modules/react-native-sdk... folder and where are the Xcode projects linked to this? I can see three folders in my node_folders module react-native-fbsdkcore, react-native-fbsdklogin and react-native-fbsdkshare but no projects inside?

Quote:

Add the `RCTFBSDK...` Xcode projects from `node_modules/react-native-sdk...` to your app's Xcode project.

from react-native-fbsdk.

yelled3 avatar yelled3 commented on May 24, 2024

@MossP

each sub repo has it's own README.md, e.g react-native-fbsdklogin

https://github.com/facebook/react-native-fbsdk/tree/master/react-native-fbsdklogin#installation

Add RCTFBSDKLogin.xcodeproj from node_modules/react-native-fbsdklogin to your Xcode project navigator.

from react-native-fbsdk.

MossP avatar MossP commented on May 24, 2024

I think my installation must be trashed then, there're no Xcode projects in mine.. I'll start again and see how I get on, thanks :)

from react-native-fbsdk.

tnguyen42 avatar tnguyen42 commented on May 24, 2024

Thanks @yelled3, that unlocked the situation for me.
But now I have another new error I've never seen before. I'll open a new issue for that.

from react-native-fbsdk.

philikon avatar philikon commented on May 24, 2024

it's not clear if I can use the SDK pods altogether or if the setup is different.

I added podspecs to react-native-fbsdk the other day. 0.0.5 will have support for using CocoaPods which will make things a lot simpler for some folks.

from react-native-fbsdk.

yelled3 avatar yelled3 commented on May 24, 2024

@philikon that will be awesome, thanks

from react-native-fbsdk.

philikon avatar philikon commented on May 24, 2024

I just released 0.0.5 with the podspecs and updated READMEs. Hope that helps!

from react-native-fbsdk.

philikon avatar philikon commented on May 24, 2024

I was able to make it work.
the missing part was part 2:
http://facebook.github.io/react-native/docs/linking-libraries-ios.html#step-2

That's good feedback. I'll update the README to include a link to this document.

from react-native-fbsdk.

philikon avatar philikon commented on May 24, 2024

Fixed in 13c1355

from react-native-fbsdk.

yelled3 avatar yelled3 commented on May 24, 2024

@philikon

I just released 0.0.5 with the podspecs and updated READMEs. Hope that helps!

there's still some confusion here;
when installing the pod you have to to do npm install --save react-native-fbsdklogin before you do pod install.
if you don't, you'll get:

[!] No podspec found for `react-native-fbsdkcore` in `node_modules/react-native-fbsdklogin`

from react-native-fbsdk.

yelled3 avatar yelled3 commented on May 24, 2024

@philikon also wanted to ask - why do I need to specify
source 'https://github.com/CocoaPods/Specs.git' in my Podfile?

from react-native-fbsdk.

philikon avatar philikon commented on May 24, 2024

there's still some confusion here;
when installing the pod you have to to do npm install --save react-native-fbsdklogin before you do pod install.

Correct. That's why the README file mentions those steps in that order and even explicitly says:

Note: Any of the options below assume you've already installed the npm packages as mentioned above.

See https://github.com/facebook/react-native-fbsdk/blame/0.0.5/README.md#L182. Was there anything unclear in those instructions?

@philikon also wanted to ask - why do I need to specify
source 'https://github.com/CocoaPods/Specs.git' in my Podfile?

So that CocoaPods knows where to download the Facebook SDK for iOS source code from.

from react-native-fbsdk.

MossP avatar MossP commented on May 24, 2024

For the guys that have now got it all working; are you able to archive the project via Xcode?

from react-native-fbsdk.

MossP avatar MossP commented on May 24, 2024

@yelled3 Can you archive the project? I've tried on a new project with just this installed and it fails even though building for devices works fine.

from react-native-fbsdk.

yelled3 avatar yelled3 commented on May 24, 2024

@MossP haven't tried yet - I'll let you know.
what's the exception you're getting? (copy-paste the stack trace)

from react-native-fbsdk.

MossP avatar MossP commented on May 24, 2024

cheers @yelled3. The error I'm getting is RCTBridgeModule.h not found. I've raised an issue for it here #21

Any chance you could hit the archive button and let me know if yours completes successfully?

from react-native-fbsdk.

yelled3 avatar yelled3 commented on May 24, 2024

@MossP sorry for the delay, I'm also getting the same issue

.../node_modules/react-native-fbsdkcore/iOS/RCTFBSDKGraphRequestManager.h:19:9: 'RCTBridgeModule.h' file not found

@philikon any idea why this happens?

from react-native-fbsdk.

yelled3 avatar yelled3 commented on May 24, 2024

@MossP for what it's worth, although Archive didn't work - I was able to run the app on my own phone.

from react-native-fbsdk.

MossP avatar MossP commented on May 24, 2024

No worries, @yelled3. I get the same thing. I can push a build of the app to my test devices but can't successfully archive for the app store. I think it's something to do with the framework linking but I've followed everything to the letter several times and also on a clean project to eliminate the possibility of it being anything else. I've had to remove it from my project now for that reason. I'll let you know if I have any luck. Let me know if you find anything. Hopefully @philikon can shed some light on the issue.

from react-native-fbsdk.

MossP avatar MossP commented on May 24, 2024

I have a new issue already already raised for it #21 but got tumbleweed so far on it.

from react-native-fbsdk.

krishpop avatar krishpop commented on May 24, 2024

I've been struggling with setting up the frameworks for this for the entire day. I get the following errors when I try to build the application. I have successfully added the frameworks from the Facebook SDK, but in doing so, I get the following errors:

ld: 154 duplicate symbols for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Any clue as to what the problem is

from react-native-fbsdk.

chrisp-fb avatar chrisp-fb commented on May 24, 2024

@krishpop can you include more of the error message such as the symbol that is duplicated? As a wild guess, if it's "__llvm" and you're using Xcode 6.x, this is caused by the inclusion of bitcode in the libraries which is not compatible with Xcode 6. You should update to Xcode 7.

from react-native-fbsdk.

krishpop avatar krishpop commented on May 24, 2024

@chrisp-fb that worked, thanks!

from react-native-fbsdk.

shangsunset avatar shangsunset commented on May 24, 2024

Hi @chrisp-fb,

Im on xcode 7 but still get similar errors after pod install.

Ld /Users/shangyeshen/Library/Developer/Xcode/DerivedData/Cairn-dhzzdiyaeawbyxflutcoooilxvie/Build/Products/Debug-iphonesimulator/Cairn.app/Cairn normal x86_64
    cd /Users/shangyeshen/Sites/Cairn/ios
    export IPHONEOS_DEPLOYMENT_TARGET=7.0
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.2.sdk -L/Users/shangyeshen/Library/Developer/Xcode/DerivedData/Cairn-dhzzdiyaeawbyxflutcoooilxvie/Build/Products/Debug-iphonesimulator -F/Users/shangyeshen/Library/Developer/Xcode/DerivedData/Cairn-dhzzdiyaeawbyxflutcoooilxvie/Build/Products/Debug-iphonesimulator -filelist /Users/shangyeshen/Library/Developer/Xcode/DerivedData/Cairn-dhzzdiyaeawbyxflutcoooilxvie/Build/Intermediates/Cairn.build/Debug-iphonesimulator/Cairn.build/Objects-normal/x86_64/Cairn.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=7.0 -Xlinker -objc_abi_version -Xlinker 2 -ObjC -fobjc-arc -fobjc-link-runtime -lPods -Xlinker -dependency_info -Xlinker /Users/shangyeshen/Library/Developer/Xcode/DerivedData/Cairn-dhzzdiyaeawbyxflutcoooilxvie/Build/Intermediates/Cairn.build/Debug-iphonesimulator/Cairn.build/Objects-normal/x86_64/Cairn_dependency_info.dat -o /Users/shangyeshen/Library/Developer/Xcode/DerivedData/Cairn-dhzzdiyaeawbyxflutcoooilxvie/Build/Products/Debug-iphonesimulator/Cairn.app/Cairn

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_RCTRootView", referenced from:
      objc-class-ref in AppDelegate.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

from react-native-fbsdk.

shangsunset avatar shangsunset commented on May 24, 2024

my bad. forgot about this step:

go to Xcode's target Build Setting section, find Other linker flags and add $(inherited) in it.

from react-native-fbsdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.