ios - 需要未知模块 "react-native-fbsdklogin"

标签 ios xcode react-native fbsdkloginkit

试图包括 react-native-fbsdklogin在我的 React-native 项目中没有成功。

error

看起来它已经被添加到我的项目中...?

frameworkinproject

它也被添加到标题搜索路径中......?

headerpaths

我遵循了 npm 模块页面中的手动安装步骤。我使用 rnpm link 命令在我的项目中自动链接它。我重新启动了打包程序并执行了一个project >> clean。项目构建成功,但我尝试的一切都没有清除此错误。

这里有什么问题,我怎样才能让它工作?

最佳答案

通过引用模块的相对路径解决了这个问题:

从'../../../node_modules/react-native-fbsdklogin/FBSDKLogin.ios'导入FBSDKLogin, {FBSDKLoginButton, FBSDKLoginManager};

关于ios - 需要未知模块 "react-native-fbsdklogin",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35690721/

相关文章:

xcode - XCode 3.2 可以在 10.5 Leopard 上运行吗?

ios - 不使用 Xcode 运行 iOS 应用程序

arrays - Swift 从数组中获取 x 个元素

ios - 如何使用键盘 "Go"像 Swift 2 中的 UIButton 一样提交 UITextFields

ios - 图像未显示在图像阵列上

javascript - 如何在 React Native 应用程序中添加 "Set as Wallpaper"选项

javascript - 在 React Native 中使用 FlatList 中的 ref

reactjs - 导航到父堆栈的父堆栈

ios - 使用 Swift 中的导航 Controller 在 View Controller 中缺少后退按钮

ios - 将 MKMapView 移动到相对于父 View 的特定位置