我想在我的应用程序中找到我的位置。而且我use CoreLocationManager
要获取坐标,但是当我启动应用程序时,它会提醒我天气以授权位置隐私,然后单击确定按钮后,什么也没发生。
然后我在我的 iPhone 中打开设置-隐私-位置,我发现我的应用程序没有启用位置。我打开它,然后我重新启动应用程序,仍然没有任何反应?
这是我的代码:
CLLocationManager *locationManager = [[CLLocationManager alloc] init];
[locationManager setDelegate:self];
[locationManager setDesiredAccuracy:kCLLocationAccuracyBest];
[locationManager startUpdatingLocation];
-(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
{
}
设置断点后该方法-(void)locationManager:(CLLocationManager *)manager didUpdateLocations:(NSArray *)locations
无法运行。