Question: I want to create an app that allows a user to find the nearby other users location using GPS coordinates who are Logged in to the same app .Also it can be track the location of the devices(Logged in to the same app) which are moving in a car .

Can someone give me an overview of how I can accomplish this. is there any free API available to accomplish this task.

Answer: 
Danielbeard is correct - you would need to be continually storing/updating locations on a server somewhere. Your app does get some running time when it is in the background, but I'm not sure it would be enough to run the web traffic that you'd need.

Check out this post: [Running app in background and send frequent http request](https://stackoverflow.com/questions/4954661/iphone-sdk-running-app-in-background-and-send-frequent-http-request)

And check out the multitasking guide here: [Multitasking Guidelines](http://developer.apple.com/library/ios/#DOCUMENTATION/iPhone/Conceptual/iPhoneOSProgrammingGuide/ManagingYourApplicationsFlow/ManagingYourApplicationsFlow.html)

You can also look at Push Notifications. Hopefully this helps.
In iOS7 MultiPeerConnectivity was introduced to find near by applications, so if you have a coffee shop and someone walks by or in they could get the latest deals, or, you walk into a room and the music changes to what you like as your device exchanges information with another.

<http://nshipster.com/multipeer-connectivity/>