Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7552189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:41:52+00:00 2026-05-30T10:41:52+00:00

I want to get the user’s current location from my iPhone app. I want

  • 0

I want to get the user’s current location from my iPhone app. I want to show the user’s current location like country name, latitude, longitude information in my app. And also i want to show the location in Google map also. I have tried Google search also, but can’t get the exact answer. I have get the info that was to use CLLocationManager in my app to track the location. How do i use this? I have download one sample app from Apple Documents. Here is the link: https://developer.apple.com/library/ios/#samplecode/LocateMe/Introduction/Intro.html

Can you please help me on this? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T10:41:54+00:00Added an answer on May 30, 2026 at 10:41 am

    1) I have get the info that was to use CLLocationManager in my app to track the location. How do i use this?

    in .h file

    #include <CoreLocation/CLLocationManagerDelegate.h>
    #include <CoreLocation/CLError.h>
    #include <CoreLocation/CLLocation.h>
    #include <CoreLocation/CLLocationManager.h>
    
    CLLocationManager   * myLocationManager;
    
    CLLocation          * myLocation;
    

    in .m file :-

        -(void)findMyCurrentLocation
        {           
    
        self.myLocationManager = [[[CLLocationManager alloc] init] autorelease];
        [[self myLocationManager] setDelegate:self ];
        [myLocationManager startUpdatingLocation];
    
        double latitude=34.052234;
        double longitude=-118.243685;
    
        CLLocation *defaultLocation =[[CLLocation alloc] initWithLatitude:latitude longitude:longitude];
        [self setMyLocation:defaultLocation];
        [defaultLocation release];
    
        if( [CLLocationManager locationServicesEnabled] )
        {   
            NSLog(@"Location Services Enabled....");
            locationServicesEnabled=TRUE;
            UIAlertView *alert = [ [UIAlertView alloc] initWithTitle:@"Information" 
                                                             message:@"Fetching your current location." 
                                                            delegate:self 
                                                   cancelButtonTitle:@"OK" 
                                                   otherButtonTitles:nil ];
            [alert release];
        }
        else
        {   
            NSLog( @"Location Services Are Not Enabled...." );
            locationServicesEnabled=FALSE;
            UIAlertView *alert = [ [UIAlertView alloc] initWithTitle:@"Information" 
                                                             message:@"Location service is not enable. Please enable it from settings." 
                                                            delegate:self 
                                                   cancelButtonTitle:@"OK" 
                                                   otherButtonTitles:nil ];
            [alert release];
         }
    
            }
    
        - (void)locationManager:(CLLocationManager *)manager didUpdateToLocation: (CLLocation *)newLocation fromLocation:(CLLocation *)oldLocation
        {
          [self setMyLocation:newLocation];
    
        NSString *tempLat = [ NSString stringWithFormat:@"%3.6f" , (newLocation.coordinate.latitude) ];
        NSString *tempLong= [ NSString stringWithFormat:@"%3.6f" , (newLocation.coordinate.longitude)];
    
        appDelegate.curlat = tempLat;
        appDelegate.curlong = tempLong;
       }
    
         - (void)locationManager: (CLLocationManager *)manager didFailWithError: (NSError *)error
         {
        printf("\nerror");
        UIAlertView *alert = [ [UIAlertView alloc] initWithTitle:@"Error" 
                                                         message:@"Error while getting your current location." 
                                                        delegate:self 
                                               cancelButtonTitle:@"OK" 
                                               otherButtonTitles:nil ];
    
        [alert release];
         }
    

    2). I want to show the user’s current location like country name information in my app.

    For this you can to use Google’s Reverse Geo coding OR MKReverseGeocoder

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my app i want to get the user current location through GPS and
Hi In my android app, I want to get user's input from a EditText
I'm Implementing a simple web app using Django, I want to get user's location
I want to get User's Location based on IP. When user enters website I
I want get the user profile large or normal picture from facebook. Now I
I have List of User object, I just want to get User objects from
If I want to get a user input from Console to my Expression Tree.
I want to get data from a DMA enabled, PCIe hardware device into user-space
Currently I make a twitter app for android. I want to get user's home
I want to get the user roles Just like getting node types using this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.