When you do need access to a user's location, you have to ask permission first. Similar to how you have to add a reason for needing the camera or a user's contacts to the Info.plist file, you must also provide a reason for requesting location data. In the case of location data, there are two keys you can add to the Info.plist:
- Privacy-Location When In Use Usage Description (NSLocationWhenInUseUsageDescription)
- Privacy-Location Always And When In Use Usage Description (NSLocationAlwaysAndWhenInUseUsageDescription)
When your app asks for permission to use a user's location data, they have the option to only allow your app access to their location when the app is in use, or they can choose to allow ...