user1309075
user1309075

Reputation: 35

Do I need to ask for user permission when Using CoreLocation?

My app never tracks a users location. So do I need to ask for permission from the user when using CoreLocation? The app only downloads data from the server to be displayed on the map.

Upvotes: 0

Views: 78

Answers (2)

Rob
Rob

Reputation: 438287

It’s not a question of your intent (i.e. “tracking” them or just offering some useful feature). It’s merely a question whether the app uses the user’s current location for any reason, whatsoever.

For example, you might not be tracking them (not storing it anywhere), but rather just using location services to simplify the search for nearby points of interest, or include the user’s location on the map (e.g. mapView.showsUserLocation) to make it easier for them to get their bearings, or calculate directions/distance, etc. If your app uses the user’s current location for any purpose, then you will would need to request authorization (at that point).

But, if your app doesn’t offer any of those capabilities, then you don’t need to request authorization.

For what it’s worth, you don’t have to request location authorization up-front. If location services are not a central feature of the app, but some tangentially related feature, you might defer this authorization request to a point in the app where the location might make life simpler for the user. E.g. you might just show the point of interest on the map, but offer a button so the user can get directions or travel time, right in the app, and if they tap on this button, that’s when you might request location services authorization. But if the user doesn’t need directions, the user might not tap on that button, and the app wouldn’t need to ask for authorization at all.

Bottom line, it’s just a question of whether you use location services for any reason, and if so, when you might ask for authorization.

Upvotes: 1

Core Location provides services that determine a device’s geographic location, altitude, and orientation, or its position relative to a nearby iBeacon device.

You use instances of the CLLocationManager class to configure, start, and stop the Core Location services.

Reference : Core Location | Apple Documentation

If there is no necessity of tracking user's location on app, there is no need to ask for user permission.

Upvotes: 2

Related Questions