App & OS/Hybrid
[React Native] 프로젝트 생성하기 (2019년 기준)
romeoh
2019. 6. 14. 04:01
반응형
React Native Cli 설치하기
$ sudo npm install -g react-native-cli
React Native Project 생성하기
$ cd /my/project/path/
$ react-native init firstProject
Build 하기
$ cd firstProject
$ react-native start --reset-cache
Android Build 하기
react-native start 한 터미널을 그대로 두고 새로운 터미널을 엽니다.
$ cd /my/project/path/firstProject
$ react-native run-android
socket 통신 오류가 날경우
$ react-native run-android --port=8081
iOS build 하기
$ react-native run-ios
iOS build 옵션사용하기
Release 버전으로 build 하기
$ react-native run-ios --configuration Release
시뮬레이터 특정 기기로 build 하기
$ react-native run-ios --simulator="iPhone 4s (11.1)"
iPhone device로 build하기
$ react-native run-ios --device
반응형