空空叶博客 学习与开发博客

在mac下为ios进行react native开发

2018-04-14
kongkongye
rn

react native

安装依赖

  1. Node,Watchman: 推荐使用HomeBrew来安装

     brew install node
     brew install watchman
    

    Watchman用来监控文件改变

  2. React Native CLI: 使用命令:

     npm install -g react-native-cli
    
  3. Xcode: 比如通过mac app store来安装,会同时安装ios模拟器各其它必要的构建ios应用的工具

    同时,你可能需要安装Xcode Command Line Tools,方法为在Xcode里打开Preferences,在Locations选项卡下选择.

快速使用

  1. 新建项目,使用命令react-native init 项目名
  2. 运行项目,在项目目录下使用命令react-native run-ios

相似文章

下一篇 react native

目录