Im trying to make an iphone app like google latitude or find my friends. I'm able to find my current location but how do i locate my friends? And also how do i show that location on the map?
Asked
Active
Viewed 692 times
0
-
1Please refer `Corelocaiton` framework. – priyanka Nov 15 '12 at 09:32
1 Answers
0
You can refer here to know about getting user current location.
- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation {
NSLog(@"OldLocation %f %f", oldLocation.coordinate.latitude, oldLocation.coordinate.longitude);
NSLog(@"NewLocation %f %f", newLocation.coordinate.latitude, newLocation.coordinate.longitude);
}
You Must need a web service that stores locations of each devices when the app is running, then from your app send a query to the web-service from there you will find the list of device using the app.
It's not a very elegant solution since the user is always polling the server and the web request can fail more often than you'd want. I heard about socket programming where the user keeps a live connection to the server and when ever the server changes, the user is notified, sounds more like the right approach but also sounds much harder :P
see my answer here For Showing Multiple annotation on MAP.

Community
- 1
- 1

Siba Prasad Hota
- 4,779
- 1
- 20
- 40
-
Is there any other way to do this? in another words, Are there any api's available in google maps for IOS ? – 2vision2 May 14 '14 at 13:53