react native
安装依赖
-
Node
,Watchman
: 推荐使用HomeBrew来安装brew install node brew install watchman
Watchman用来监控文件改变
-
React Native CLI
: 使用命令:npm install -g react-native-cli
-
Xcode
: 比如通过mac app store
来安装,会同时安装ios模拟器各其它必要的构建ios应用的工具同时,你可能需要安装
Xcode Command Line Tools
,方法为在Xcode里打开Preferences
,在Locations
选项卡下选择.
快速使用
- 新建项目,使用命令
react-native init 项目名
- 运行项目,在项目目录下使用命令
react-native run-ios