ios - React Native 0.61 : With autolinking, 还需要在 Podfile 中添加行吗?

标签 ios xcode react-native cocoapods podfile

我注意到,当我在 React Native 0.61 中安装 native 库时,它们不会自动向我的 Podfile 添加行,但是当我运行 pod install 时,它似乎还是链接了这些库。有谁知道这是如何工作的?我还需要向 Podfile 添加行吗?

最佳答案

当你创建一个新项目并且react-native版本 >=60 时,此行会自动添加到 pod 文件中( AutoLinking )

# example/ios/Podfile
require_relative '../../node_modules/@react-native-community/cli-platform-ios/native_modules'

这是脚本的路径。当您添加新库时,不会向我的 Podfile 添加任何行,但您必须运行“pod install”,以便脚本文件可以运行并安装新的 pod 文件。

关于ios - React Native 0.61 : With autolinking, 还需要在 Podfile 中添加行吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58477123/

相关文章:

objective-c - drawRect 和 addSubview : custom drawing affects which views?

ios - 首次加载时,UIScrollView 内容位于导航栏下方

iphone - 如何使用Apple SimpleFtpsample项目中的Listviewcontroller类从ftp获取文件夹列表

react-native - 如何在终端中启动android avd模拟器

react-native - 如何在 react-native (ANDROID) 中获取预定的本地通知

ios - 如何让你的推送通知打开某个 View Controller ?

ios - 选择快速加载 View 的正确方法或事件

Xcode 4 - 使用现有项目

IOS:证书问题

javascript - react native 导航路线未定义