Qt Positioning iOS에서
iOS 앱에서 Qt Positioning 서비스 사용
iOS 디바이스에서 앱이 포지셔닝 서비스를 사용할 수 있도록 하려면 앱이 사용 중일 때 또는 앱이 백그라운드에서 실행 중일 때 포지셔닝 서비스가 필요한지 여부에 따라 Info.plist 파일에 항목을 추가해야 합니다.
권한이 추가되면 앱이 포지셔닝 서비스를 요청할 때 사용자가 포지셔닝 서비스를 사용할 수 있도록 권한을 부여해야 합니다. 사용자는 설정 > 개인정보 > 위치 서비스로 이동하여 아래로 스크롤하여 앱을 찾은 다음 옵션을 선택하여 변경할 수 있습니다. 위치 서비스가 작동하려면 위치 서비스가 켜져 있어야 합니다.
포그라운드 위치 서비스 권한 사용
앱이 실행 중일 때 위치 서비스를 사용하는 경우 Info.plist 파일에 NSLocationWhenInUseUsageDescription
키가 포함된 항목과 앱이 위치 서비스를 사용하는 이유를 사용자에게 알려주는 텍스트 문자열이 포함된 값이 있어야 합니다.
<key>NSLocationWhenInUseUsageDescription</key> <string>The reason why the app needs location services</string>
백그라운드 위치 서비스 사용 권한
앱이 백그라운드에서 실행 중일 때에도 위치 서비스를 사용하는 경우 NSLocationAlwaysAndWhenInUseUsageDescription
키와 이유를 문자열 값으로 하는 항목이 NSLocationWhenInUseUsageDescription
와 함께 있어야 합니다.
<key>NSLocationWhenInUseUsageDescription</key> <string>The reason why the app needs location services</string> <key>NSLocationAlwaysAndWhenInUseUsageDescription</key> <string>The reason why the app needs location services</string>
참고: Info.plist 파일은 자동으로 생성되며, 별도의 조치를 취하지 않으면 qmake 또는 CMake가 변경 내용을 덮어쓸 수 있습니다. 자세한 내용은 플랫폼 노트 - iOS를 참조하세요.
© 2025 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.