views:

149

answers:

3

What kind of api does SDK provide if we are to develop an app which keeps tracks of friends location?

Update:

CoreLocation gets the device location with the app running. But how to get the friends location data if you have their phone number.

Does anyone have idea to get the location data of friends using iphone sdk

+1  A: 

I'm guessing you mean something like Core Location framework? This still would only be able to track the device location with the app running. You would have to pass your friends location data to a server and fetch it from there to be able to track them on any device.

http://developer.apple.com/iphone/library/documentation/CoreLocation/Reference/CoreLocation_Framework/index.html

iWasRobbed
CoreLocation gets the device location with the app running.But how to get the friends location data if you have their phone number.
You cannot do that unless they are publishing their location data somewhere that you can download it from. A typical scenario would be: you and two of your friends are using 'App A' which is publishing your locations to a webserver. 'App A' looks and finds your "friends" on the webserver and downloads their location data and updates that information on a map within 'App A'. You can't find someone's random location without their knowledge or with triangulation. At best, you can fake it like some of the crApps do in the App Store.
iWasRobbed
+1  A: 

I would be surprised if Apple let any old app communicate with another iPhone to determine that iPhone's location. You'll probably have to maintain a database of locations that syncs with your app from time to time. Anyone using that app will then be able to access their friends' locations.

mcandre
A: 

hey iWasRobbed, so are you saying that the iphone app does not actually tracks friends' location but the webserver does?

Thanks!

Felicos
No, I was saying that you cannot share data between two iPhones simply through CoreLocation. For instance, if you have your app on two different phones, the other phone doesn't know anything about your phone's location unless you post that location data somewhere (like a server).
iWasRobbed