`
jsntghf
  • 浏览: 2511591 次
  • 性别: Icon_minigender_1
  • 来自: 苏州
社区版块
存档分类
最新评论

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

    博客分类:
  • iOS
阅读更多

做地图应用时,在控制台报出下面的错误: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都升级到最新版

分享到:
评论
2 楼 jsntghf 2012-10-19  
是的,但是这个不会对定位有影响,最简单的办法还是进行升级。
1 楼 沉寂的青春 2012-10-18  
请问下,如果按第一种方法解决,所得到的location不就是38.148926 和:-120.715542了吗?

相关推荐

Global site tag (gtag.js) - Google Analytics