ios - How can I get location from app in background/foreground after every 5 min -


how can it?

-(void)updatelocation {  [self performselector:@selector(updatelocation) withobject:nil afterdelay:300];  [self.locationtracker updatelocationtoserver]; } 

but it's not working every time.

try use nstimer

nsinteger minutes = 5; [nstimer scheduledtimerwithtimeinterval:60 * minutes                                  target:self                                selector:@selector(updatelocation)                                userinfo:nil                                 repeats:yes]; 

Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -