【发布时间】:2014-09-24 14:48:07
【问题描述】:
我需要在没有互联网的情况下使用 GPS 找到我的当前位置并在 Google 地图上显示。
在 iPhone 上
一切正常,显示位置。
在 iPad 上
我将CLLocationManager 用作delegate。然而它在方法didFailWithError:(NSError *)error 上返回了以下错误:
Error Domain=kCLErrorDomain Code=0 "操作无法完成。(kCLErrorDomain error 0.)"
创建CLLocationManager代码:
locationManager = [[CLLocationManager alloc]init];
locationManager.delegate = self;
locationManager.distanceFilter = kCLDistanceFilterNone;
locationManager.desiredAccuracy = kCLLocationAccuracyBest;
[locationManager startUpdatingLocation];
PS:我需要在没有任何互联网连接的情况下找到当前位置。 iPad 在状态栏上显示指示器本地化。 (互联网连接一切正常并显示位置)。 iPad 是第 4 代 iOS 7.1。
【问题讨论】: