私はGPSを使用して連携更新を行い、ユーザーが移動していないときにGPS更新を一時停止したいと考えています。 ビデオ「場所サービスでトラックにとどまる」ごとに、私はこれをしなかったAS:pausesLocationUpdates iOS 6の自動設定が正常に動作しない
//Configure Location Manager
self.theLocationManager = [[CLLocationManager alloc]init];
[self.theLocationManager setDelegate:self];
[self.theLocationManager setDesiredAccuracy:kCLLocationAccuracyBest];
[self.theLocationManager setActivityType:CLActivityTypeFitness];
NSLog(@"Activity Type Set: CLActivityTypeFitness");
[self.theLocationManager setPausesLocationUpdatesAutomatically:YES];
[self.theLocationManager startUpdatingLocation];
代表者:
- (void)locationManager:(CLLocationManager *)manager
didUpdateLocations:(NSArray *)locations
{
NSLog(@"Started location Updates");
}
- (void)locationManagerDidPauseLocationUpdates:(CLLocationManager *)manager
{
NSLog(@"Pausing location Updates");
}
- (void)locationManagerDidResumeLocationUpdates:(CLLocationManager *)manager
{
NSLog(@"Resuming location Updates");
UIAlertView *pop = [[UIAlertView alloc]initWithTitle:@"Info" message:@"Location Updates resumed" delegate:nil cancelButtonTitle:@"OK" otherButtonTitles:nil, nil];
[pop show];
[pop release];
}
私は「didPauseを望ましい行動とデリゲートを取得できませんでした。.. "と" didResume ... "は、デバイスがアイドルだったときにさえ呼び出されませんでした。
理想的には、GPSの更新は、デバイスの状態とCLActivityTypeに応じて停止して再開する必要がありますが、ここでは該当しません。
誰でも助けてもらえますか、間違っていますか?
ありがとうございます。
ソースをご覧ください。 – androniennn
はいソースをお願いしますか? – loki
@androniennn私はそれを何回も試みました。私の経験に基づいて、16-17分は何が起こるかです。どうやらAppleは開発者にこれらの数字を知らせたくないと思う。 – Honey