Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS에서 getMeterPerDp를 실행하는 경우, 크래시가 발생함 #85

Closed
devJayve opened this issue May 1, 2023 · 5 comments · Fixed by #125
Closed

iOS에서 getMeterPerDp를 실행하는 경우, 크래시가 발생함 #85

devJayve opened this issue May 1, 2023 · 5 comments · Fixed by #125

Comments

@devJayve
Copy link

devJayve commented May 1, 2023

iOS 실기기 (14 pro)
Android는 실기기에서 정상작동하며 버전은 1.1로 pod update NMapsMap 까지 마쳤습니다.

초기 Initialize 과정에서 error exception없이 sdk가 초기화됐으나, 그 이후에 바로 아래와같은 에러가 발생하며 맵이 튕깁니다.

image

비슷한 게시물로 naver map 초기화 전에 moveCamera를 호출한다는 내용을 보았으나 해당 코드는 없습니다 ㅠ

@note11g
Copy link
Owner

note11g commented May 1, 2023

@Dev-Jave 안녕하세요. 이슈를 제보해 주셔서 감사드립니다.
해당 사항 재현 확인 후, 다시 코멘트 드리도록 하겠습니다. 감사합니다.

@devJayve
Copy link
Author

devJayve commented May 1, 2023

안녕하세요! 빠른 이슈 확인 감사합니다.

몇가지 테스트를 진행해보았는데 NaverMap SDK가 별도의 exception없이 초기화 되기 때문에 별도의 매개변수 없이 기본형으로 초기화했을 때 지도가 보여지는 것을 확인했습니다. (이때도 가장 기본적으로 뜨는 에러는 'iOS NMFMapView is not authorized.'이나, 앱은 꺼지지 않습니다.)

제가 세팅해놓았던 것들을 하나씩 추가해보면서 디버깅해본 결과 mapController.getMeterPerDp() 메서드에서 위와 같이 에러를 반환하면서 튕기는 것을 확인했습니다.

@note11g
Copy link
Owner

note11g commented May 1, 2023

@Dev-Jave 맞습니다.
"iOS NMFMapView is not authorized."는 runtime에 sdk를 initialize하는 경우 반드시 발생하는 메시지로, 오류가 아닙니다. (네이버맵 iOS SDK의 버그 or 의도로 보입니다)

말씀해주신대로, 오류가 발생한 부분이 getMeterPerDp 메서드를 실행하는 부분이 일치함을 확인하였으며,
이 부분은 Dev-Jave님께서 어디서, 어떻게 해당 메서드를 사용하도록 작성해주셨는지 확인이 필요한 부분입니다.
혹시, 해당 메서드를 실행하는 코드를 어디서, 어떻게 작성하셨는지 코드를 부탁드려도 될까요?

@devJayve
Copy link
Author

devJayve commented May 1, 2023

해당 메서드는 맵이 이동된 뒤 onCameraIdle() 메서드 내에 위치해있습니다.
getMeterPerDp로 거리를 계산해서 거리 수치에 맞게 정보를 불러오는데 사용하고 있습니다.
해당 메서드를 주석처리하면 정상 작동(마커 이미지 제외)하는 것을 보아 다른 부분은 문제가 되지 않는 것 같습니다!

( + 추가로 NoverlayImage.fromAssetImage가 과도하게 커지는 오류가 발생하는데, 다른 이슈에서 확인해보니 1.0이후에는 해당 버그가 없어졌다고 확인했습니다. 1.0 , 1.1로 바꾸어도 그대로 인데 제 패키지 버전이 변경이 안된걸까요? )

@note11g note11g added 1.0 (deprecated label) 1.0 version's issue iOS labels May 4, 2023
@note11g
Copy link
Owner

note11g commented May 11, 2023

@Dev-Jave
해당 이슈는 재현 단계를 부탁드리겠습니다.
추가적인 이슈는 새로운 이슈로 열어주시면 감사드리겠습니다. 감사합니다

@note11g note11g changed the title iOS NMFMapView is not authorized. iOS에서 getMeterPerDp를 실행하는 경우, 크래시가 발생함 May 12, 2023
Soogyo-In added a commit to Soogyo-In/flutter_naver_map that referenced this issue Oct 19, 2023
note11g added a commit that referenced this issue Oct 22, 2023
Fix #85 (apply PR #125 adaptive)
@note11g note11g mentioned this issue Jan 2, 2024
@note11g note11g closed this as completed in 6533ca4 Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

2 participants