[英]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-icons
和npm i react-native-device-info
添加了两个模块react-native-vector-icons
和react-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.