locationServicesEnabled always return YES

后端 未结 6 1495
臣服心动
臣服心动 2021-02-03 10:28

I tested my device (iPod Touch 2G iOS 4.1) if location services are enabled

permitted = [locationManager locationServicesEnabled];

and I always

6条回答
  •  梦如初夏
    2021-02-03 11:12

    if(![CLLocationManager locationServicesEnabled] || ([CLLocationManager authorizationStatus]!=kCLAuthorizationStatusAuthorizedWhenInUse && [CLLocationManager authorizationStatus]!=kCLAuthorizationStatusAuthorizedAlways))
    {
            ; // app doesn't have access to localization to whatever you want
    }
    

提交回复
热议问题