목록rn (15)
바르고 뜨겁게
React Native - Error: spawn ./gradlew EACCESreact-native run-android 실행시 아래와 같은 에러가 종종 발생된다. error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details. Error: spawn ./gradlew EACCES at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19) 접근 권한의 문제이며..
React Native A4 Size Print View리액트 네이티브에서 실물 A4 사이즈를 얻기위해 View를 구성하는 방법. 1. 현실 크기 구하기IOS에서는 pixel 이라는 단위를 사용하고 , 안드로이드에선 dp 라는 단위를 사용한다.ReactNative의 단위를 현실크기에 맞추기 위한 식은 아래와 같다. import { PixelRatio } from "react-native"; export function _getCmToRealPixel(cm) { return PixelRatio.roundToNearestPixel(Number(cm) * 37.795276) }roundToNearestPixel레이아웃 크기 (dp)를 정수 픽셀 수에 해당하는 가장 가까운 레이아웃 크기로 반올림합니다. 예를..
Axios multipart image network errorhttp 통신을 사용하여 멀티파트 업로드를 구현중 ... 이미지를 폼데이터에 추가하면Network Error가 발행되는 경우가 있다. 1. name, type, uri 확인간혹 type을 빼먹으면 network error가 난다고 하니 주의하자.formData.append("imgPath01", { name: "imgPath01.jpg", type: imgPath01.mime, uri: imgPath01.path }); 2. 안드로이드 FLIPPER_VERSION 버전 업그레이드android > gradle.propertiesFLIPPER_VERSION=0.46.02-2. 클린 , 리빌드android ->app->source->debug2-1..
FlatList에 데이터가 많이 담기면 에러 로그도 없이 IOS 앱이 죽는 현상이 있음.(안드로이드는 문제 없음) FlatList 내에 아래 코드를 추가하면 해결 됨.
[IOS ERROR] Bundle Idenfifier 변경시 linker command failed with exit code 1 에러 IOS 에서 Bundle ID 변경시 빌드 중 inker command failed with exit code 1 에러가 발생된다. https://stackoverflow.com/questions/55109983/react-native-maps-call-api-request-when-onregionchange 몇가지 해결책이 있는데 Build Settings > Build Options > Enable Bitcode : No 로 변경시 해결이 가능하다. 방법 2상단 프로젝트 클릭New Scheme 선택새로운 스킴을 만들어서 해당 스킴에서 실행 방법 3xCode 에서 ne..
React Native - IOS UIWebView Deprecated 해결 방법 20.05.01 기준으로 프로젝트에 UIWebView 포함시 IOS Appstore Connect 에 앱을 업로드하게 되면 아래 메시지가 출력되며 앱이 업로드 되지 않는다. ITMS-90809: Deprecated API Usage - New apps that use UIWebView are no longer accepted. Instead, use WKWebView for improved security and reliability. Learn more (https://developer.apple.com/documentation/uikit/uiwebview). 이 때 살펴봐야될 부분들을 정리해보습니다. webview를 의..
프로젝트 생성모듈용 템플릿 도구 create-react-native-module 설치npm install -g react-native-cli yarn npm install -g create-react-native-module 프로젝트 생성create-react-native-module --prefix RN --package-identifier [ 패키지 식별자 ] --generate-example [ 프로젝트 이름 ]--prefix : 라이브러리 접두사--package-identifier : 안드로이드 패키지 식별자 (ex : com.righthot)--view : 매우 간단한 기본 뷰 구성 요소로 모듈 생성 (미 입력시 기본 모듈형태 프로젝트 생성)--generate-example : 예제 프로젝트를 ..
React Native - Facebook Audience 광고 적용하기 (react-native-fbads)https://github.com/callstack/react-native-fbads#installation1. Facebook SDK 설치 https://github.com/facebook/react-native-fbsdk페이스북 로그인을 적용했다면, 건너뛰어도 됩니다.2. Facebook Audience 설치패키지 설치 및 링크 yarn add react-native-fbads react-native link react-native-fbads네이티브 프로젝트에 추가IOSiOS/Podfile pod 'FBAudienceNetwork', '~> 5.1.0' pod installANDROIDMain..
React native [Object object] 출력 및 값 확인서버 통신 처리를 하다보면 프론트에서는 서버 값을 로그로 확인한다.보통 JSON.stringify(object) 혹은 String(object) 형태로 값 확인이 가능하지만...Type 이 정확하지 않을 경우 Type Error 를 발생 시킨다.그럴 땐 아래 방법으로 key를 구한 뒤 JSON.stringify(object.key) 혹은 String(object.key) 로 확인하면 된다. for (var key in object) { console.log("key: " + key + " / " + object[key]) }
ReactNative - Lottie 사용시 ErrorVSCode 에서 IOS 빌드시 다음과 같은 에러가 난다The following build commands failed: Ld build/[프로젝트명]/Build/Products/Debug-iphoneos/[프로젝트명].app/PlugIns/[프로젝트명]Tests.xctest/[프로젝트명]Tests normal arm64 --- 해결 방법 xCode의 [프로젝트 명] 폴더에 File.swift 를 생성한다.react-naitve start 를 하지 않은 상태에서 xCode 에서 run --- 문제점react-naitve start 를 하지 않은 상태에서 xCode 에서 run 을 했을시 정상 동작한다. - 만약 react-native start 후 x..