Solve Problem/React Native 65

[React Native] Sentry로 로그 이벤트 확인하기

0. 데브에서 찍는 콘솔을 릴리즈에서도 보고 싶었다. Sentry를 이용하면 된다! 1. 라이브러리 github.com/getsentry/sentry-react-native getsentry/sentry-react-native Official Sentry SDK for react-native. Contribute to getsentry/sentry-react-native development by creating an account on GitHub. github.com 2. 일단 sentry-cli 깔고 docs.sentry.io/cli/installation/ 3. 로그인 등등 docs.sentry.io/cli/configuration/ Configuration and Authentication do..

[React Native] Firebase Admob - Rewards 보상형 동영상 광고 띄우기

1. 설치 yarn add @react-native-firebase/admob cd ios && pod install 2. 적용 // /firebase.json { "react-native": { "admob_android_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx", "admob_ios_app_id": "ca-app-pub-xxxxxxxx~xxxxxxxx" } } 3. 실행 3-1. iOS 에러 빌드는 잘 됐는데 xcode 터미널에 이러한 에러가 떴음 Terminating app due to uncaught exception 'GADInvalidInitializationException', reason: 'The Google Mobile Ads SDK was initializ..

[React Native] Deep Link 딥링크

1. 딥링크 이해하기https://help.adbrix.io/hc/ko/articles/360039757433-%EB%94%A5%EB%A7%81%ED%81%AC-Deeplink-URI%EC%8A%A4%ED%82%B4-%EC%9C%A0%EB%8B%88%EB%B2%84%EC%85%9C-%EB%A7%81%ED%81%AC-%EC%95%B1%EB%A7%81%ED%81%AC-%EA%B5%AC%EB%B6%84%EA%B3%BC-%EC%9D%B4%ED%95%B4 딥링크(Deeplink) : URI스킴, 유니버셜 링크, 앱링크 구분과 이해  딥링크 (Deeplink) http 혹은 https 로 시작하는 인터넷 주소는 모두 특정 서비스의 웹페이지로 이동합니다. _ https://igaworks.com 을 주소창에 입력하면..

[React Native] 앱 화면 캡쳐 후 공유 및 갤러리에 저장하기 (Capture ScreenShot and Share)

목적: 앱 내 화면을 그대로 이미지로 추출하여 카카오톡이나 인스타로 공유 및 갤러리에 저장을 하고 싶음 1. 환경react-native: 0.61.5react-native-view-shot: 3.1.2react-native-share: 3.7.0@react-native-community/cameraroll: 4.0.02. 설치1) react-native-view-shot=> 오토링크! 2) react-native-share=> 오토링크! 3) @react-native-community/cameraroll=> 오토링크!(https://coding-dahee.tistory.com/147 이곳에서 cameraroll 설치 방법 자세히 보기!) https://coding-dahee.tistory.com/1473..

[React Native] 관리자용 테스트앱 만들기

최근: iOS: 테스트플라이트가 곧 테스트용 앱이니까 따로 바꿔준건 없음1. firebase GoogleService 어쩌구도 prod도 dev 바라보도록2. 스플래시3. 아이콘4. 코드푸시 키(4까지는 공통)5. Android applicationId 변경6. iOS: 왜인지 모르겠지만 스키마 하나 더 만들었음. build 하면 device 관련 에러났기 때문에.1. 에러Could not get GOOGLE_APP_ID in Google Services file from build environmenthttps://stackoverflow.com/questions/57006663/could-not-get-google-app-id-in-google-services-file-from-build-enviro..

[React Native] react-navigation 화면이 포커스되었을 때를 감지하기 & 특정 화면에서 돌아왔을 때 api 호출하기

1. To DoA screen에서 B screen으로 navigate한 후 다시 A로 goBack했을 때 goBack한 순간 A screen에서 api 호출을 다시 해야한다.(C screen에서 A screen으로 오면 아무것도 하지 않는다) 2. How To2-1. react navigation 활용 (해결책x)https://reactnavigation.org/docs/function-after-focusing-screen/ React NavigationIn this guide we will call a function or render something on screen focusing. This is useful for making additional API calls when a user revi..

[React Native] react native android apk 뽑기

1. apk 뽑는 블로그 그대로 따라했음https://bomjjack.github.io/programming/2018/01/06/rn-android-app-release/ React Native 릴리즈 빌드(안드로이드 편)안드로이드편.bomjjack.github.io  2. apk 뽑기는 성공했는데 api url이 https가 아닌 http 여서 통신이 안됐음.안드로이드 release 버전에서는 http 통신이 기본적으로 안됨. 그래서 설정을 해줘야 함! 해결책 -> github.com/facebook/react-native/issues/24408#issuecomment-537081276 Fetch not working for HTTP requests on Android · Issue #24408 · f..

[React Native] react-native-svg ProgressCircle로 시계 나타내는 법 / startAngle, endAngle

1. 라이브러리 https://github.com/JesperLekland/react-native-svg-charts JesperLekland/react-native-svg-charts 📈 One library to rule all charts for React Native 📊 - JesperLekland/react-native-svg-charts github.com 2. ProgressCircle Usage - 10시~3시, 6시~12시 같은 일정이 있으면 그 시간만큼이 채워진 원형 그래프를 그리고 싶었다. - 딱 적합한 것이 ProgressCircle이었다. - 먼저 문서 그대로 사용해보면 이렇게 보인다. * 코드 * 결과 - 특정 시간대를 이 원형그래프로 나타내려면 어떻게 해야할까? - startA..

[React Native] AppState / detect foreground, background

0. 소개AppState를 이용하면 앱이 background였다가 foreground 상태로 왔는지, 그 반대인지를 알 수 있다.  1. 문서https://reactnative.dev/docs/appstate.html React Native · A framework for building native apps using ReactA framework for building native apps using Reactreactnative.dev 2. Usage앱이 포그라운드 -> 백그라운드 로 가는 순간appState는 active -> inactive -> background로 바뀐다. 이 과정에서 앱이 백그라운드 상태가 되면 setAppState가 매끄럽게 이어져서 appState는 background여..

출처: https://mingos-habitat.tistory.com/34 [밍고의서식지:티스토리]