(iphone) get client's location without alert view?
The location doesn't have to be precise,
it is sufficient to get location previously fetched. and several kilometer error is fine.I suspect this is violation of policy
But no harm to ask I guessIf there's no legit way of obtaining location without pop up,
how long does it take to get a location with accuracy of seve开发者_JS百科ral kilometersThank you
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.
Apple won't allow usage of CoreLocation framework without user accepting it. This thread might interest you
That alert is there for a reason. You shouldn't get a user's location without asking them first.
Activating the Location API will generate the Alert Dialog to allow the user to opt in. This is handled by the Operating System and it not available to control. And it shouldn't be.
精彩评论