Yosi Dahan
Yosi Dahan

Reputation: 441

Displaying live location data from server

I have an iPhone app which should display the location of unlimited number of users on a map.

The way I want to do it is sending a request to the server every 5-8 seconds and get the best location of the users. Also every user sends his location automatically every 5-8 seconds to the server.

Is there another or more valuable way for doing this?

Upvotes: 2

Views: 62

Answers (1)

Rajneesh071
Rajneesh071

Reputation: 31091

You can use NSTimer for this task, this is the best way,

[NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(sendYourRequest:) userInfo:nil repeats:YES];

Upvotes: 1

Related Questions