반응형
https://developer.apple.com/documentation/corelocation/cllocationmanager/1423523-authorizationstatus
https://www.python2.net/questions-1214864.htm
func locationAuthorizationStatus() -> CLAuthorizationStatus {
let locationManager= CLLocationManager()
var locationAuthorizationStatus : CLAuthorizationStatus
if #available(iOS 14.0, *) {
locationAuthorizationStatus= locationManager.authorizationStatus
} else {
//Fallback on earlier versions
locationAuthorizationStatus= CLLocationManager.authorizationStatus()
}
return locationAuthorizationStatus
}
반응형
'모바일 > IOS' 카테고리의 다른 글
Stored properties cannot be marked potentially unavailable with '@available' (0) | 2022.12.01 |
---|---|
pod deintegrate throws RuntimeError - [Xcodeproj] Unknown object version (56) [2022-11-04 수정] (0) | 2022.09.23 |
자주 리젝되는 사유 (0) | 2021.01.19 |
IOS14 업데이트후 푸쉬권한 (0) | 2020.10.28 |
sudo killall -STOP -c usbd (0) | 2020.09.04 |