环境及工具配置
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install node
npm config set registry https://registry.npm.taobao.org --global
npm config set disturl https://npm.taobao.org/dist --global
npm install -g yarn react-native-cli
yarn config set registry https://registry.npm.taobao.org --global
扫描二维码关注公众号,回复:
127243 查看本文章
yarn config set disturl https://npm.taobao.org/dist --global
下载代码的关联第三方包
cd 到react-native项目目录
yarn install
react-native link
打开xcode,打开项目选择react native项目下ios目录
点一下xcode的三角形
如果还报错,在xcode中product里面点一下clean
如果是证书有错,请自行解决证书问题
运行模拟器时如果太大,选中模拟器,在菜单栏window里面取消勾选show device bezels,
然后可以自由拉伸模拟器屏幕。
打正式包就是正常的打ios正式包的流程。