-1

Hi I'm working on this project for my university where the basic idea is to track down the users location and when the app is installed you can have friends and the user can track his or her friends location on the map when authorized .It's similar to find my friend app . I'm new to this development but I'm eager to learn n develop so if u guys can help me in any form i I would be very thankful to u guys .

nandhp
  • 4,680
  • 2
  • 30
  • 42
Madhu Sudhan
  • 9
  • 1
  • 1
  • 2
    Welcome to StackOverflow. Please read the FAQ about the types of questions you can ask. Yours is much too vague and broad. – rmaddy Nov 15 '12 at 04:47

2 Answers2

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
0

You should check out the Location Awareness Programming Guide which talks about how to determine one's location in an iOS app. Other portions of the Guide also discuss the process for displaying maps.

To then take that location information and then identify other people in your immediate area adds another level of complexity, where you presumably need to develop a server to coordinate (a) receiving information submitted from the app about where the particular user is; (b) report back to the app which of the user's friends are within some reasonable distance of the user's particular location. This strikes me as an extraordinarily complicated project for a new developer. It might be more prudent to focus on developing an app without this sort of server complexity. This is especially true when there are a plethora of existing apps that already exist to allow friends to share their locations with each other.

Rob
  • 415,655
  • 72
  • 787
  • 1,044