I know how to make this with NSTimer but I wan\'t to get current iPhone coordinates without timer on every few seconds. I can\'t use timer because I am getting coordinates w
I think you can do it in background with a Timer:
[NSTimer scheduledTimerWithTimeInterval:kAlertInterval target:self selector:@selector(checkLoc:) userInfo:nil repeats:YES];
And in your method:
- (void)checkLoc:(NSTimer *)timer {
//...get your location and...
if ([UIApplication sharedApplication].applicationState == UIApplicationStateBackground) {
//Do your background stuff
}
}
I have this code working in some apps. Please, tell me if it works for you.