반응형

ReactNative 7

[ReactNative] iOS, Android 구분하기 (Platform)

ReactNative로 개발을 하다보면 특히 화면을 구성할 때 iOS, Android를 구분해서 다르게 구성하는 경우도 있습니다. 이럴 때 iOS인지 Android인지 구분하는 방법을 알아보겠습니다. import React from 'react'; import {Platform, SafeAreaView, StyleSheet} from 'react-native'; const App = { return ( ); } const styles = StyleSheet.create({ container: { flex: 1, padding: Platform.select({ios: 10, android: 20}) } }); export default App; Platform을 사용하면 운영체제별 다른 값으로 설정하여 운..

[ReactNative] CodePush

2021.07.20 - [Programming/React Native] - [ReactNative] Code push를 위한 App center 연동 [ReactNative] Code push를 위한 App center 연동 CodePush는 MS에서 만든 App Center https://appcenter.ms/ App Center 홈페이지에 가서 가입을 진행한 후 아래와 같이 앱을 등록합니다. 앱을 등록하실 때 본인의 서비스 명칭이 myservice 라고 한다면 꼭 ios는.. marsland.tistory.com 2021.08.03 - [Programming/React Native] - [ReactNative] CodePush 셋팅 [ReactNative] CodePush 셋팅 2021.07.20 ..

[ReaceNative] Expiring Daemon because JVM heap space is exhausted

ReactNative 에서 안드로이드 빌드를하려고 할때 JVM 메모리가 부족해서 빌드에 실패할 경우가 있다. > Task :app:packageRelease FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':app:packageRelease'. > A failure occurred while executing com.android.build.gradle.tasks.PackageAndroidArtifact$IncrementalSplitterRunnable > java.lang.OutOfMemoryError (no error message) * Try: Run with --stacktrac..

[ReactNative] CodePush 셋팅

2021.07.20 - [Programming/React Native] - [ReactNative] Code push를 위한 App center 연동 appcenter login ➜ marsland git:(master) ✗ appcenter login Opening your browser... ? Visit https://appcenter.ms/cli-login?hostname=marsland-ui-MacBookPro.local and enter the code: ? Access code from browser: ${token} Logged in as marsland appcenter login 명령어를 입력하면 브라우저 새로운 탭으로 아래와 같이 하나 열린다. 그 화면에 보이는 token을 복사해서 ..

[ReactNative] Code push를 위한 App center 연동

CodePush는 MS에서 만든 App Center https://appcenter.ms/ App Center 홈페이지에 가서 가입을 진행한 후 아래와 같이 앱을 등록합니다. 앱을 등록하실 때 본인의 서비스 명칭이 myservice라고 한다면 꼭 ios는 myservice-ios, android일 경우에는 myservice-android로 앱 이름을 정하도록 합시다. 나중에 헷갈리지 않게요~ Android 앱 등록 저의 경우에는 ReactNative로 Android 앱을 등록하겠습니다. 앱 등록 후 화면 이제 약간의 설정을 해줘야하는데 매우 심플합니다. npm install appcenter appcenter-analytics appcenter-crashes --save-exact npm을 이용해서 ap..

반응형