相关疑难解决方法(0)

如何使用延迟位置iOS 6?

我正在尝试使用新的iOS 6功能的自定义位置更新,但继续收到此错误:

didFinishDeferredUpdatesWithError:Error Domain = kCLErrorDomain Code = 11"无法完成操作.(kCLErrorDomain error 11.)"

我使用以下代码:

- (DeviceAPI *) init
    {
     locationManager = [[CLLocationManager alloc] init];
     [locationManager setDelegate:self];
     [locationManager setDesiredAccuracy:kCLLocationAccuracyBest];
     [locationManager startUpdatingLocation];
     [locationManager allowDeferredLocationUpdatesUntilTraveled:(CLLocationDistance)100000     timeout:(NSTimeInterval)100000];

    return self;
 }
Run Code Online (Sandbox Code Playgroud)

而这个callback功能:

- (void)locationManager:    (CLLocationManager *)   manager
                        didFinishDeferredUpdatesWithError:(NSError *)error
{
    NSLog(@"didFinishDeferredUpdatesWithError :%@", [error description]);
}
Run Code Online (Sandbox Code Playgroud)

有帮助吗?

xcode location ios6

5
推荐指数
2
解决办法
9393
查看次数

标签 统计

ios6 ×1

location ×1

xcode ×1