Location access – App is not asking for user permission to access location – iOS 11

I have gone through the Apple documentation and found the solution for this question.

Apple has changed few guidelines to get user location.

Here is the Video Link: Apple- What’s New in Location Technologies

Full code for location access in Swift & Objective-C both

Solution:

Now we need to add three Authentication Key into Plist:

  1. NSLocationAlwaysAndWhenInUseUsageDescription
  2. NSLocationWhenInUseUsageDescription
  3. NSLocationAlwaysUsageDescription

Plist will look like :
enter image description here
And Authentication message screen will look like:

enter image description here

Full code for location access

Leave a Comment