server did not accept client registration 68的解决方法

做地图应用时,在控制台报出下面的错误:server did not accept client registration 68,这是一个bug,有两种解决方法。

 

1、AppDelegate的实现文件中,在import和@implementation之间加入以下代码:

 

@implementation CLLocationManager (TemporaryHack)

- (void)hackLocationFix {
    CLLocation *location = [[CLLocation alloc] initWithLatitude:38.148926 longitude:-120.715542];
    [[self delegate] locationManager:self didUpdateToLocation:location fromLocation:nil];     
}

- (void)startUpdatingLocation {
    [self performSelector:@selector(hackLocationFix) withObject:nil afterDelay:0.1];
}

@end

 

2、将Xcode和iOS都升级到最新版

你可能感兴趣的:(ios,iPhone)