草庐IT

kCLAuthorizationStatusNotDetermin

全部标签

iphone - 如何检查我们在 iOS 中的特定应用程序的 GPS 权限是打开还是关闭?

与使用BOOLlocaService=[CLLocationManagerlocationServicesEnabled];它将返回通用GPS服务的bool值,我们如何检查特定应用程序的服务是打开还是关闭。 最佳答案 [CLLocationManagerauthorizationStatus]返回一个CLAuthorizationStatus,它被定义为kCLAuthorizationStatusNotDetermined、kCLAuthorizationStatusRestricted、kCLAuthorizationStatus

iOS:应用程序在安装应用程序时不征求用户的许可。每次都获取 kCLAuthorizationStatusNotDetermined - Objective-c & Swift

我正在尝试在我的iOS应用程序中获取用户位置。我首先在我的项目中包含了corelocation框架。然后点击一个按钮,我正在调用核心位置api,如下所示。当我尝试在设备中安装它时,核心位置从不询问用户许可。当我尝试在单击按钮时获取位置时,我得到kCLAuthorizationStatusNotDetermined作为授权状态。请帮助我。我不知道发生了什么。-(IBAction)fetchLessAccurateLocation:(id)sender{[self.txtLocationsetText:@""];locationManager=[[CLLocationManagerallo