Facebook SDK导致React Native构建失败

时间:2016-11-07 21:45:26

标签: ios facebook react-native react-native-fbsdk

我的团队正在使用React Native构建我们的第一个iOS应用。由于某些原因,仅在我的Mac上,运行react-native run-ios后构建失败。自从我们使用react-native-fbsdk添加Facebook身份验证以来,这种情况一直在发生。

我们都在运行node -v 7.0和最新版本的Xcode。我甚至试图在本地删除回购并将其克隆回来。作为一项实验,我团队的另一名成员在本地删除了他的回购,将其克隆回来,并且能够使一切正常运转。我们坐在一起,做了完全相同的步骤,它对他有用,但不是我。

以下是我在终端中收到的错误消息:

** BUILD FAILED **


The following build commands failed:
CompileC /Users/philmok/js_projects/pLot/ios/build/Build/Intermediates/RCTFBSDK.build/Debug-iphonesimulator/RCTFBSDK.build/Objects-normal/x86_64/RCTFBSDKGraphRequestManager.o RCTFBSDK/core/RCTFBSDKGraphRequestManager.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)
Installing build/Build/Products/Debug-iphonesimulator/pLot.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=2):
Failed to install the requested application
An application bundle was not found at the provided path.
Provide a valid path to the desired application bundle.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/pLot.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

根据this question的答案,我尝试了react-native upgrade。这将允许构建完成,但它会阻止Facebook身份验证工作。

3 个答案:

答案 0 :(得分:3)

确保已下载FBSDK以进行fb登录。将它放在您的文档文件夹中,然后在xcode中打开您的项目。点击左侧菜单中的项目,然后选择构建设置标签,提供框架路径'文档中FBSDK的路径。

答案 1 :(得分:1)

添加

  pod 'FBSDKCoreKit'
  pod 'FBSDKLoginKit'
  pod 'FBSDKShareKit'

到您的Podfile然后pod install

答案 2 :(得分:0)

您是否完成了所有配置步骤?这里有一个很好的介绍,一步一步如何添加facebook sdk来响应原生app:https://github.com/magus/react-native-facebook-login。顺便说一句。如果可以,我建议使用这个lib,我在官方facebook sdk上有很多问题,转移到那个,一切正常。

相关问题