Я пытаюсь обновить текущее местоположение пользователя, мой соответствующий код:
#pragma mark-
#pragma mark CLLocationManagerDelegate
-(void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
{
float latitude=newLocation.coordinate.latitude;
float longitude=newLocation.coordinate.longitude;
TopStationAppDelegate *topStation=(TopStationAppDelegate *)[[UIApplication sharedApplication]delegate];
topStation.latitudeUtilisateur=latitude;
topStation.longitudeUtilisateur=longitude;
NSLog(@"%f",latitude);
NSLog(@"%f",longitude);
NSLog(@"position updated");
//[locationManager stopUpdatingLocation];
}
- (void)locationManager:(CLLocationManager *)manager didFailWithError:(NSError *)error
{
NSLog(@"didFailWithError: %@", error);
}
метод didFailWithError
верните мне этот стек:
ERROR,Time,332840118.515,Function,"void CLClientHandleDaemonDataRegistration(__CLClient*, mach_port_t, const CLDaemonCommToClientRegistration*, const __CFDictionary*)",server did not accept client registration 2
2011-07-20 09:35:18.525 TopStation[764:207] didFailWithError: Error Domain=kCLErrorDomain Code=1 "The operation couldn’t be completed. (kCLErrorDomain error 1.)"
Можете ли вы помочьменя там?спасибо заранее:)