개발/React native
yoon0506
2019. 12. 10. 21:01
2019. 12. 10. 21:01
|
$react-native run-ios --simulator="기종 이름"
예 ) $react-native run-ios --simulator="iPhone 4s"
|
cs |
|
$scrum simctl list devices
|
cs |
yoon0506
2019. 12. 10. 19:55
2019. 12. 10. 19:55
아래 링크의 react reference를 참고하여 순서대로 설치하면 됨.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
// 1. terminal 실행 후 아래 명령어 입력하여 설치된 모든 JDK를 확인함.
$/usr/libexec/java_home -V
// 2. 홈으로 이동.
$cd
// 3. bash_profile 에 환경 변수 추가. 'ctrl+x'-'y'-'enter' 버튼을 누르면 저장됨.
// (방법 1)
$sudo nano ~/.bash_profile
// (방법 2)
$nano .bash_profile
// 3-1. 환경변수 추가
export JAVA_HOME=/Library/Java/JavaVirtualMachines/버전이름/Contents/Home
예 ) export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk-11.0.5.jdk/Contents/Home
// 4. bash_profile 다시 로드.
$source ~/.bash_profile
// 5. 자바 버전 확인
$java -version
|
cs |
|
$react-native run-android
|
cs |
|
- ios 에뮬레이터 : cmd + D
- android 에뮬레이터 : cmd + M
- android 기기 : 흔들면 나옴.
|
cs |