[React Native] React-native-maps Error(use Google map)

박경수·2023년 4월 18일
0

React Native

목록 보기
3/4
post-thumbnail

서론

React native maps라이브러리를 테스트 하는 중, 발생한 오류를 남기기 위한 포스트.

본론

에러 경로 in IOS

npm i react-native-maps
pod install
Podfile 수정
AppDelegate.mm 수정
pod install
(!) Got Error message

결과적으로 React-native-maps 모듈에 react-native-google-maps.podspec파일 버전 이슈

해결

  • node_modules/react-native-maps/react-native-google-maps.podspec 경로 접속과 파일 오픈
  • s.platform 의 버전과 Root/ios/podfile의 platform 버전 차이 이슈.

설명

react-native-maps를 이용하기 위해 아래 코드 삽입.

require_relative '../node_modules/@react-native...';
rn_maps_path = '../node_modules/react-native-maps';

platform : ios, min_ios_version_surpported //이 부분 이슈
// 수정 코드
platform : ios, '13.0' // 위 react-native-google-maps.podspec의 s.platform 버전과 일치 시킴

정상 인스톨 확인

profile
<>{...}</>

0개의 댓글