小编bam*_*ide的帖子

在 React Native 0.61 上链接 API:openUrl 不是函数

我正在尝试理解在 iOS 上的 React Native 0.61.5 中启用链接 API 的文档。 https://facebook.github.io/react-native/docs/linking

文档说需要按照以下步骤手动链接库:https : //facebook.github.io/react-native/docs/linking-libraries-ios#manual-linking

但是在 node_modules/react-native/Library/Linking 或 node_modules/react-native/Library/LinkingIOS 下没有用于链接的 .xcodeproj,因此我没有手动链接库。是否有手动链接库的替代说明?

当我现在尝试从我的应用程序调用 Linking.openUrl 时,出现以下错误:

TypeError: _reactNative.Linking.openUrl is not a function. 
Run Code Online (Sandbox Code Playgroud)

另外,在我的 Podfile 中,我看到了这一行:

pod 'React-RCTLinking', :path => '../node_modules/react-native/Libraries/LinkingIOS'

Run Code Online (Sandbox Code Playgroud)

任何帮助是极大的赞赏!

react-native

1
推荐指数
1
解决办法
783
查看次数

标签 统计

react-native ×1