To get a current location latitude and longitude values using Core Location framework.

1. Include the core location framework in to your project by going to Link Binaries With Libraries in your projects Build Phases.

2. Then make your view controller to conform to CLLocationManagerDelegate in viewcontroller.h file as below.

#import <CoreLocation/CoreLocation.h>
@interface TLViewController : UIViewController<CLLocationManagerDelegate>{
      CLLocationManager *locationManager;

3. Initialize the location manager object and call the method CurrentLocationIdentifier as below.

locationManager = [[CLLocationManager alloc] init];
 [self CurrentLocationIdentifier]; // method prints the current location latitude and longitude values.
      //---- For getting current gps location
      locationManager = [CLLocationManager new];
      locationManager.delegate = self;
      locationManager.desiredAccuracy = kCLLocationAccuracyBest;
      [locationManager startUpdatingLocation];

4. The location manager delegates fetches the locations latitude and longitude values as and when it is  updated and prints it in the log.

- (void)locationManager:(CLLocationManager *)manager didUpdateToLocation:(CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation{
    NSLog(@"didUpdateToLocation: %@", newLocation);
    if (currentLocation != nil) {

Download X-Code Project Here!