작성
·
257
0
강의에서는 안드로이드로 나오는데, 해당 pub를 참고해서 ios 디바이스에서 적용하려하였습니다.
plist 에도 내용을 기록하고 적용하였습니다만, 안되네요.
검색을 해보았습니다만. ios14 이상은 권한? 문제라고 하는데 ..
혹시 관련 내용을 참고 할 만한 것이 있을까요?
답변 1
0
pub.dev에서 가이드하고 있는데요.
https://pub.dev/packages/geolocator
iOS의 경우 ios/Runner/Info.plist 파일에 권한 관련하여 다음 코드를 추가를 해 주어야 하네요.
<key>NSLocationWhenInUseUsageDescription</key>
<string>This app needs access to location when open.</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>This app needs access to location when in the background.</string>