Issue Description I am working on tracking app and want to enable "always" location permission when user start it's tracking service. Here I am building path traveled by user, so I want to detect latitudes and longitudes even if app is background. Now problem occurs when user chooses location option as "while app in use", in this I am not getting exact latitude and longitude for user when app is in background and creating issues. In this case I am not able to build a proper track for user.
To do this I have added only
"NSLocationAlwaysUsageDescription"
but it generates error::
This app has attempted to access privacy-sensitive data without a usage description. The app's Info.plist must contain both NSLocationAlwaysAndWhenInUseUsageDescription and NSLocationWhenInUseUsageDescription keys with string values explaining to the user how the app uses this data
To resolve this I have to add all the permission, which work fine in my case. But now user is getting three option while enabling location:: "allow while using app", "always allow" and "don't allow". Here the problem occur.
Requirement I want to restrict user to only enables the "always" location option, but now location request popup is showing three option. Is there any method to detect selected option by user, if user will select any option other than always I will tell him to choose "always" when working on tracking system.
1.Basically I want to detect the selected location option of user, and if it is not "always" I want to request him again to choose "always" location option. Is this possible?
2.I want to add "always" option inside request service popup, currently I am getting these three values:: "allow while using app", "allow once" and "don't allow". I have added permissions in a format::
<key>NSLocationUsageDescription</key>
<key>NSLocationAlwaysUsageDescription</key>
<key>NSLocationWhenInUseUsageDescription</key>
<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
but it's showing only three value check this screenshot::