didupdatelocations OCCASIONALLY

时间:2015-09-08 01:40:05

标签: ios google-maps location cllocationmanager cllocation

我不知道发生了什么,但我的程序偶尔会更新位置。我更新了plist文件以允许位置服务,我从来没有在我的程序中停止更新位置。

我说:

NSLog(@"Test")

在我的didupdatelocations之后,很少更新。我做错了什么?!

我在使用授权时请求,locationmanager.delegate设置为self

我是否只是在一个网络连接不良的坏区域?

此外,当出现此问题时,我正在使用实际的iphone。当我使用模拟器时,它工作得很好,并不断更新其位置。所以我对发生的事情感到困惑。

有人问我的位置经理

locationmanager = [[cllocationmanager alloc]init];
locationmanager.delegate = self;
locationmanager.distanceFilter = kCLDistanceFilterNone;
locationmanager.desiredAccuracy = kCLLocationAccuracyBest;
[locationmanager requestAlwaysAuthorization];
[locationmanager startUpdatingLocation];

0 个答案:

没有答案