How to specify why the app is requesting access to the location? I would like to clarify the use of location in permission modal alert.
Just go to your info.plist
and add the following keys
String that you provide to these keys will be picked appropriately by iOS to show the message of the dialog when you request for user permission to access the location.
Which message will be picked will be decided dynamically based on what kind of permission you are asking for. Eg : when you ask for Location Always permission its corresponding message will be picked and vice versa when you use location when in use.
Hope it helps
Open your plist with source code, and add below
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Message for Always and when used desc</string>
<key>NSLocationAlwaysUsageDescription</key>
<string>Message for Always used desc</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Message for when used desc</string>
For iOS Devices you need to specifiy NSLocationAlwaysUsageDescription
or NSLocationWhenInUseUsageDescription
directly in your Info.plist file in xCode. After that iOS will automatically manage to show your specified message in an alert.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With