React-native-fbsdk: Error react-native run-ios

Created on 19 Apr 2016  路  9Comments  路  Source: facebook/react-native-fbsdk

1) create project and install sdk

react-native init fbprueba
npm install --save react-native-fbsdk

2) create pod file and add deps and install pods

    # Uncomment this line to define a global platform for your project
# platform :ios, '8.0'
# Uncomment this line if you're using Swift
# use_frameworks!

target 'fbprueba' do
  source 'https://github.com/CocoaPods/Specs.git'
  pod 'React', :subspecs => ['Core', 'RCTImage', 'RCTNetwork', 'RCTText', 'RCTWebSocket'], :path => '../node_modules/react-native'
  pod 'react-native-fbsdkcore', :path => '../node_modules/react-native-fbsdk/iOS/core'
  pod 'react-native-fbsdklogin', :path => '../node_modules/react-native-fbsdk/iOS/login'
  pod 'react-native-fbsdkshare', :path => '../node_modules/react-native-fbsdk/iOS/share'
end

target 'fbpruebaTests' do

end


pod install

3) run ios

react-native run-ios

4) error :(

CompileC /Users/gerson/Desktop/fbprueba/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/react-native-fbsdkshare.build/Objects-normal/x86_64/RCTFBSDKGameRequestDialog.o /Users/gerson/Desktop/fbprueba/node_modules/react-native-fbsdk/iOS/share/iOS/RCTFBSDKGameRequestDialog.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
    cd /Users/gerson/Desktop/fbprueba/ios/Pods
    export LANG=en_US.US-ASCII
    export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Users/gerson/.nvm/versions/node/v4.4.3/bin:/usr/local/sbin:/usr/local/opt/php70/bin:/Users/gerson/.composer/vendor/bin:/Users/gerson/Proyectos/GO/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/go/libexec/bin"
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -arch x86_64 -fmessage-length=143 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fcolor-diagnostics -std=gnu99 -fobjc-arc -fmodules -gmodules -fmodules-cache-path=/Users/gerson/Desktop/fbprueba/ios/build/ModuleCache -fmodules-prune-interval=86400 -fmodules-prune-after=345600 -fbuild-session-file=/Users/gerson/Desktop/fbprueba/ios/build/ModuleCache/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror=non-modular-include-in-framework-module -Wno-trigraphs -fpascal-strings -O0 -fno-common -Wno-missing-field-initializers -Wno-missing-prototypes -Wunreachable-code -Wno-implicit-atomic-properties -Wno-arc-repeated-use-of-weak -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wno-deprecated-implementations -DPOD_CONFIGURATION_DEBUG=1 -DDEBUG=1 -DCOCOAPODS=1 -DOBJC_OLD_DISPATCH_PROTOTYPES=0 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator9.3.sdk -fasm-blocks -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -mios-simulator-version-min=7.0 -g -Wno-sign-conversion -fobjc-abi-version=2 -fobjc-legacy-dispatch -iquote /Users/gerson/Desktop/fbprueba/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/react-native-fbsdkshare.build/react-native-fbsdkshare-generated-files.hmap -I/Users/gerson/Desktop/fbprueba/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/react-native-fbsdkshare.build/react-native-fbsdkshare-own-target-headers.hmap -I/Users/gerson/Desktop/fbprueba/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/react-native-fbsdkshare.build/react-native-fbsdkshare-all-target-headers.hmap -iquote /Users/gerson/Desktop/fbprueba/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/react-native-fbsdkshare.build/react-native-fbsdkshare-project-headers.hmap -I/Users/gerson/Desktop/fbprueba/ios/build/Build/Products/Debug-iphonesimulator/react-native-fbsdkshare/include -I/Users/gerson/Desktop/fbprueba/ios/Pods/Headers/Private -I/Users/gerson/Desktop/fbprueba/ios/Pods/Headers/Private/react-native-fbsdkshare -I/Users/gerson/Desktop/fbprueba/ios/Pods/Headers/Public -I/Users/gerson/Desktop/fbprueba/ios/Pods/Headers/Public/Bolts -I/Users/gerson/Desktop/fbprueba/ios/Pods/Headers/Public/FBSDKCoreKit -I/Users/gerson/Desktop/fbprueba/ios/Pods/Headers/Public/FBSDKLoginKit -I/Users/gerson/Desktop/fbprueba/ios/Pods/Headers/Public/FBSDKShareKit -I/Users/gerson/Desktop/fbprueba/ios/Pods/Headers/Public/React -I/Users/gerson/Desktop/fbprueba/ios/Pods/Headers/Public/react-native-fbsdkcore -I/Users/gerson/Desktop/fbprueba/ios/Pods/Headers/Public/react-native-fbsdklogin -I/Users/gerson/Desktop/fbprueba/ios/Pods/Headers/Public/react-native-fbsdkshare -I/Users/gerson/Desktop/fbprueba/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/react-native-fbsdkshare.build/DerivedSources/x86_64 -I/Users/gerson/Desktop/fbprueba/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/react-native-fbsdkshare.build/DerivedSources -F/Users/gerson/Desktop/fbprueba/ios/build/Build/Products/Debug-iphonesimulator/react-native-fbsdkshare -include /Users/gerson/Desktop/fbprueba/ios/Pods/Target\ Support\ Files/react-native-fbsdkshare/react-native-fbsdkshare-prefix.pch -MMD -MT dependencies -MF /Users/gerson/Desktop/fbprueba/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/react-native-fbsdkshare.build/Objects-normal/x86_64/RCTFBSDKGameRequestDialog.d --serialize-diagnostics /Users/gerson/Desktop/fbprueba/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/react-native-fbsdkshare.build/Objects-normal/x86_64/RCTFBSDKGameRequestDialog.dia -c /Users/gerson/Desktop/fbprueba/node_modules/react-native-fbsdk/iOS/share/iOS/RCTFBSDKGameRequestDialog.m -o /Users/gerson/Desktop/fbprueba/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/react-native-fbsdkshare.build/Objects-normal/x86_64/RCTFBSDKGameRequestDialog.o

** BUILD FAILED **


The following build commands failed:
    CompileC /Users/gerson/Desktop/fbprueba/ios/build/Build/Intermediates/Pods.build/Debug-iphonesimulator/react-native-fbsdkshare.build/Objects-normal/x86_64/RCTConvert+FBSDKSharingContent.o /Users/gerson/Desktop/fbprueba/node_modules/react-native-fbsdk/iOS/share/iOS/RCTConvert+FBSDKSharingContent.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

5) build on xCode the same error :/

/Users/gerson/Desktop/fbprueba/node_modules/react-native-fbsdk/iOS/share/iOS/RCTConvert+FBSDKSharingContent.m:69:19: Property 'hashtag' not found on object of type '__strong RCTFBSDKSharingContent' (aka '__strong id<FBSDKSharingContent>')


/Users/gerson/Desktop/fbprueba/node_modules/react-native-fbsdk/iOS/share/iOS/RCTConvert+FBSDKSharingContent.m:69:30: Use of undeclared identifier 'FBSDKHashtag'

/Users/gerson/Desktop/fbprueba/node_modules/react-native-fbsdk/iOS/share/iOS/RCTConvert+FBSDKSharingContent.m:80:15: Property 'quote' not found on object of type 'FBSDKShareLinkContent *'

Most helpful comment

In case anyone else gets this, in my case it's because the new react-native-fbsdk (0.2.0) started depending on ~/Documents/FacebookSDK/ (instead of the CocoaPods version in my source tree that was pointed at 4.11). Unfortunately, the version in my ~/Documents was a year old due to disuse, and needed updating.

All 9 comments

+1

Got the same problem. I guess it's because of the react-native 0.24.1. My old project with 0.23.1 is fine.

I am having the same problem. Please fix

At me, version 0.25.1 of react-native does not resolve this issue.

pod install install the version 4.8.0 of _FBSDKShareKit_ (and _FBSDKLoginKit_, _FBSDKCoreKit_), incompatible versions with react-native-fbsdk.

To add the following lines in the Podfile, and launch pod update resolve this issue.

pod 'FBSDKCoreKit', '~> 4.11'
pod 'FBSDKLoginKit', '~> 4.11'
pod 'FBSDKShareKit', '~> 4.11'

@maarekj This solved it for me, too. Thanks!!

In case anyone else gets this, in my case it's because the new react-native-fbsdk (0.2.0) started depending on ~/Documents/FacebookSDK/ (instead of the CocoaPods version in my source tree that was pointed at 4.11). Unfortunately, the version in my ~/Documents was a year old due to disuse, and needed updating.

@maarekj This solved it for me, too, this issue is closed now 馃憤

Facing the issue while running ios app
I have uninstalled and unlink the react-native-fbsdk but still i am facing the issue.
directory not found for option '-L/Users/apple/Library/Developer/Xcode/DerivedData/NoovvooCustomer-aredtnsdhwaehefvrtsbbzgloyxo/Build/Products/Debug-iphonesimulator/React'

Was this page helpful?
0 / 5 - 0 ratings