简体   繁体   English

在React Native 0.60.5中没有链接模块

[英]Modules are not being linked in React Native 0.60.5

I created a new React Native 0.60.5 project using react-native init , and added the two modules react-native-vector-icons and react-native-device-info using npm i react-native-vector-icons and npm i react-native-device-info , respectively. 我使用react-native init创建了一个新的React Native 0.60.5项目,并使用npm i react-native-vector-iconsnpm i react-native-device-info添加了两个模块react-native-vector-iconsreact-native-device-info npm i react-native-device-info However, neither .xcodeproj file appears in my Libraries folder as they normally would, and nothing changes in my Podfile. 但是, .xcodeproj文件都没有像通常那样显示在我的Libraries文件夹中,并且Podfile中没有任何变化。 I haven't tested out if they work in the actual project yet, but just noticed this unusual behaviour and wanted to understand why. 我还没有测试它们是否可以在实际项目中工作,只是注意到了这种不寻常的行为,并想了解原因。

From React native version >= 0.60 Autolinking feature is added , you do not have to run link command . 从React本机版本> = 0.60开始,添加了自动链接功能,您不必运行link命令。

When you install library using npm/yarn , the library is auto added in pod file and files will not be added in ".xcodeproj" (it is for project with out pod but in react native >= 0.60 , pod is mandatory) . 当您使用npm / yarn安装库时,库会自动添加到pod文件中,而文件不会添加到“ .xcodeproj”中(适用于没有pod的项目,但在react native> = 0.60中,pod是必需的)

You just have to run this command 您只需要运行此命令

cd ios && pod instal

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 升级到 React Native 0.60.5 iOS 版本后,出现“No bundle URL present”错误 - After upgrading to React Native 0.60.5 iOS release build gives "No bundle URL present" error React Native CLI 对本机依赖项使用自动链接,但以下模块是手动链接的: - React Native CLI uses autolinking for native dependencies, but the following modules are linked manually: Xcode 中大约 100 个错误,体系结构 x86_64 的未定义符号:将 react-native 从 0.59.1 升级到 0.60.5 - About 100 error in Xcode, Undefined symbols for architecture x86_64 :upgraded react-native from 0.59.1 to 0.60.5 在反应原生中需要模块 - Requiring Modules in react-native React Native模块中的依赖注入 - Dependency Injection in React Native modules 在 React Native 0.61 中使用手动链接的库 - Use manually linked libraries with React Native 0.61 使用快速将导出的方法值作为未定义来反应本机本机模块? - React native native modules with swift getting exported method value as undefined? 如何将图像从原生模块发送到本机模块? - How to send images from react native to native modules? 如何在 React Native 0.60+ 中添加原生模块? - How to add native modules in React Native 0.60+? 在 Javascript 中监听 Swift 事件; React Native 原生模块 - Listening to Swift events in Javascript; React Native Native Modules
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM