웹뷰로 카카오맵 보기.

라디·2021년 6월 22일
0

webViewMap

목록 보기
1/2

kakaomap_webview 플러그인을 가져옴.

위 플러그인을 만져서, 원하는 형태로 만들어 보려한다.

  • Error!

I/chromium( 5467): [INFO:CONSOLE(4)] "A parser-blocking, cross site (i.e. different eTLD+1) script, http://t1.daumcdn.net/mapjsapi/js/main/4.3.6/kakao.js, is invoked via document.write. The network request for this script MAY be blocked by the browser in this or a future page load due to poor network connectivity. If blocked in this page load, it will be confirmed in a subsequent console message. See https://www.chromestatus

이러한 경고가 여러개 발생하면서, 아무것도 뜨지 않는다!

해결방법

Android

  • AndroidManifest.xml

android:usesCleartextTraffic="true" 추가.

    <application
        android:name="io.flutter.app.FlutterApplication"
        android:label="kakao_map_practice"
        android:icon="@mipmap/ic_launcher"
        android:usesCleartextTraffic="true">

IOS

  • Info.plist

파일 아래부분에 추가.

<key>NSAppTransportSecurity</key>
<dict>
  <key>NSAllowsArbitraryLoads</key>
  <true/>
  <key>NSAllowsArbitraryLoadsInWebContent</key>
  <true/>
</dict>

.
.
.
.
.

그래도 경고문은 계속 뜨긴 하는데.. 음

!!cross site는 신경 안써도 되는 문제.! (카카오dev 답변)

profile
피아노 배우고 싶다

0개의 댓글