React Native 官网
http://facebook.github.io/react-native/docs/getting-started.html#content
中文网站
http://reactnative.cn/docs/0.43/getting-started.html
一 、安装Homebrew
⚠️如果你电脑上没有装Xcode 的话,请先安装好Xode 之后再安装Homebrew
(1)Homebrew是什么
Homebrew 官网 https://brew.sh/index_zh-cn.html
Homebrew is the easiest and most flexible way to install the UNIX tools Apple didn’t include with macOS.(Homebrew是一个包管理器,用于在Mac上安装一些OS X没有的UNIX工具)。
Homebrew是一款Mac OS平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等很多实用的功能。简单的一条指令,就可以实现包管理,而不用你关心各种依赖和文件路径的情况,十分方便快捷。
(2)安装
打开终端输入以下命令
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
然后回车就会出现下面的这样

用文本编辑器打开工程里面的index.ios.js 文件。

打开后我们进行一些简单的文本替换,然后按command + s 保存修改

然后选择模拟器按Command+ r就可以重新编译程序。

网友评论