How to get user's current location?

How to get user's current location without asking for permission?

  • can any one tell me how can i get the current location-latitude/longitude info of the user without asking his permission? Like getting user's location automatically? Thanks in Advance. Shreya

  • Answer:

    From apple's documentation Important: In addition to hardware not being available, the user has the option of denying an application’s access to location service data. During its initial uses by an application, the Core Location framework prompts the user to confirm that using the location service is acceptable. If the user denies the request, the CLLocationManager object reports an appropriate error to its delegate during future requests. You can also check the application’s explicit authorization status using the authorizationStatus method. So apple wont allow to use CoreLocation framework without user's permission. I don't thing there is no other way without using CoreLocation framework, atleast with public API..

Shreya at Stack Overflow Visit the source

Was this solution helpful to you?

Other answers

I wouldn't recommend trying to get around Apple's TOS regarding getting user's permission to enable CoreLocation for an app. It seems like a sure fire way to get your app rejected. Apple may be http://arstechnica.com/apple/news/2011/04/how-apple-tracks-your-location-without-your-consent-and-why-it-matters.ars. http://stackoverflow.com/questions/2690255/iphone-sdk-do-i-need-to-ask-user-for-permissions-to-use-gps.

Michael Dautermann

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.