react native 有了項目代碼之後的運行(電腦未配置環境時)

環境及工具配置node

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"react

 

brew install nodeios

 

npm config set registry https://registry.npm.taobao.org --globalgit

npm config set disturl https://npm.taobao.org/dist --globalgithub

 

npm install -g yarn react-native-clinpm

 

yarn config set registry https://registry.npm.taobao.org --globalreact-native

yarn config set disturl https://npm.taobao.org/dist --globalxcode

下載代碼的關聯第三方包ruby

cd 到react-native項目目錄curl

yarn install

react-native link

打開xcode,打開項目選擇react native項目下ios目錄

點一下xcode的三角形

若是還報錯,在xcode中product裏面點一下clean

若是是證書有錯,請自行解決證書問題

 

運行模擬器時若是太大,選中模擬器,在菜單欄window裏面取消勾選show device bezels,

而後能夠自由拉伸模擬器屏幕。

 

打正式包就是正常的打ios正式包的流程。

相關文章
相關標籤/搜索