설치
https://blog.wonhada.com/?p=2910
리액트 네이티브[React Native] – 시작하기
React Native에 오신 것을 환영합니다! 이 페이지는 React Native를 시스템에 설치하고 즉시 앱을 만들 수 있게 합니다. React Native가 이미 설치되어 있다면 튜토리얼로 건너 뛸 수 있습니다. 개발 운영 체제에 따라 지침이 조금씩 다르며 iOS 또는 Android 용으로 개발을 시작할 것인지에 따라서도 다릅니다. iOS와 An…
blog.wonhada.com
튜토리얼
https://wonhada.com/?docs=리액트-네이티브react-native-0-41/기본the-basics/튜토리얼
튜토리얼
wonhada.com
어플리케이션 생성
터미널 열기
react-native init FirstProject
를 입력
그러면 'FirstProject' 라는 프로젝트가 생성됩
프로젝트들을 한 곳에 보관하고 싶다면 해당 폴더로 이동한 다음에 실행
iOS
FirstProject 폴더에 ios/ 디렉토리에 있는 FirstProject.xcodeproj 파일을 XCode에서 열기
실행된 XCode의 왼쪽 위를 보면 Run 버튼이 있는데 이 버튼을 누르면 애플리케이션이 빌드되고 실행
그리고 다른 종류의 iOS 시뮬레이터로 배포 타깃을 변경 가능
만약 실패하거나 에러가 발생한다면
FirstProject/ 디렉토리에서 다음 명령을 실행
npm install
npm start
Android
다음 명령어 실행
android avd
실행하고자 하는 애뮬레이터를 선택 후 Start 버튼 클릭
커맨드 라인에서 애뮬레이터를 바로 실행하는 방법도 있고
실행 가능한 모든 애뮬레이터 목록은 다음 명령을 통해 확인가능
emulator -list-avds
애뮬레이터가 실행되었다면 프로젝트 루트 디렉토리로 이동하여 다음 명령으로 애플리케이션을 실행
react-native run-android
위 기반 작업이 모두 끝났을 경우에
'Hello World'에 해당하는 리액트 네이티브 앱을 만드려면
react-native init HelloWorld
명령어를 커맨드 라인에 입력
VSCode에서 설치하면 좋은 Tools
https://medium.com/react-native-training/vscode-for-react-native-526ec4a368ce
VSCode for React Native
An opinionated list of extensions to get the most out of it
medium.com
Redux
[React.JS] 강좌 10-1편 Redux: React 앱의 효율적인 데이터 교류 | VELOPERT.LOG
이번 포스트는 React.js 를 통하여 만들어진 어플리케이션에서 데이터 교류 및 state 관리를 쉽고 효율적으로 하게 해주는 Redux 에 대하여 공부해보겠습니다. 강좌가 길어질 것 같아서 파트를 나눠서 강좌를 작성하겠습니다. 이번 파트에서는 이해를 돋구기 이하여 배경지식 및 특징을 알아보겠습니다. 1.소개 Redux는 JavaScript 어플리케이션에서 data-state 와 UI-state 를 관리해주는 도구입니다. 이는 상태적 데이터 관리가 시간
velopert.com
Expo vector icons
https://expo.github.io/vector-icons/
@expo/vector-icons directory
expo.github.io
Video with expo
react-native-video
react-native-video-player
full source
https://github.com/eyalcohen4/react-native-video-sample
eyalcohen4/react-native-video-sample
An example usage of Expo
github.com
출처
https://medium.com/front-end-hacking/how-to-play-video-with-react-native-and-expo-30523bfcb311
How To Play Video With React Native And Expo
Lately, As a frontend developer at Myplay, the great company I work at, I’ve been on a mission to make a proof of concept for playing…
medium.com
android build failed. SDK location not found Error 대처법
1. Go to the android/ directory of your react-native project
2. Create a file called local.properties with this line:
sdk.dir = /Users/USERNAME/Library/Android/sdk
입력해주고 저장하고
react-native run-android
실행
https://stackoverflow.com/questions/3263435
Change Makefile variable value depending on a target
I am not proficient with makefiles, but am used to simple ones. Right now, I have a task on hand. I need to compile and link a test application with a different library and different include path ...
stackoverflow.com
Device on android debugger 방법
vscode - 터미널 탭에서
adb shell input keyevent 82
입력하면 device에서 reload .. 등등 메뉴 팝업이 뜸
Menu
Reload : 말 그래도 현재 화면을 다시 로딩
Remote JS Debugging : 크롬에서 해당 프로젝트 debugging을 할 수 있음
Hot Reloadng : 이거 설정해두면 VSCode에서 수정하고 저장할 때마다 다시 로딩 해줌 (편함)
버전 체크
react-native -v
버전 변경
npm install react-native@x.x.x
Run On IOS
node_modules 쪽이 꼬여있을 수도 있으니 업데이트 및 re install
해당 프로젝트 디렉토리로 이동
brew update
brew upgrade
brew upgrade node
rm -rf node_modules
npm install
iOS on Emulator
시뮬레이터에서 cmd+D나 cmd+R 이 동작을 하지 않는다면 아래 루트로확인
xcode-->product-->Scheme-->Edit Scheme -->Run -->Build Configuration -->Debug
iOS on Device
Signing ERROR
step 1:
XCode 를 이용해 Run 할 때, Signing Error가 뜬다면
Product > Scheme > Edit Scheme 이동
Edit Scheme 창에서 Build 탭 선택

step 2:
프로젝트 이름 클릭 후 General 탭 클릭
Sining 에서 Team 을 '나(개발자)'로 교체
그러고 에러가 없으면 다행이지만..
에러가 생긴다면 구글링 고고..
출처:
step 1
https://stackoverflow.com/questions/26109851/code-signing-is-required-for-product-type-unit-test-bundle-in-sdk-ios-8-0
step 2
https://stackoverflow.com/questions/37806538/code-signing-is-required-for-product-type-application-in-sdk-ios-10-0-stic
iOS에서 신뢰할 수 없는 개발자라고 뜨면
설정 > 일반 > 기기 관리 > 개발자 앱 탭 클릭을 하면
신뢰 설정으로 바꿔야 할 앱이 표시되는데 이 앱을 신뢰한다고 바꿔주면 끝
'Study > ETC' 카테고리의 다른 글
[React Native] Slider (0) | 2019.06.03 |
---|---|
[React Native] Run iOS Device with expo (0) | 2019.06.03 |
[Cordova] Cordova 설치 및 특정 버전으로 설치 (0) | 2019.05.29 |
정규식 테스트 사이트 (0) | 2019.05.27 |
GCM Config 파일 받기(google-services.json 파일 받기) (0) | 2019.05.27 |