2

I'm developing an app for iOS and Android using Xamarin where I need to use the user's location but the location permission isn't displaying on within the app settings.

I've added:

<key>NSLocationAlwaysUsageDescription</key>
<string>Description of usage</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Description of usage</string>

to my Info.plist file but it isn't showing the location settings in my app settings.

I've also added the permissions for Media Library and Camera and they're showing perfectly fine so I'm not sure why location is any different.

Per some advice online I've also tried re-installing the app and rebooting the device, but neither have changed what I'm seeing.

I'm testing this on iOS 12.3.1.

Thanks

3 Answers3

0

From the document:

To access location services on iOS, you must set the following keys in Info.plist:

To support iOS 11 and earlier, you can include all three keys: NSLocationWhenInUseUsageDescription, NSLocationAlwaysAndWhenInUseUsageDescription, and NSLocationAlwaysUsageDescription.

See this thread for more information: location-services-not-working-in-ios-11

nevermore
  • 15,432
  • 1
  • 12
  • 30
0

do not fight, just use this plug in

https://github.com/jamesmontemagno/PermissionsPlugin/issues/93

0

Turns out the problem is I'm just a moron.

I was using the Permissions Plugin and setting NSLocationWhenInUsageDescription, NSLocationAlwaysUsageDescription and NSLocationAlwaysAndWhenInUsageDescription but using PermissionsPlugin I was only checking Location, not LocationAlways and LocationWhenInUse.

Thanks to anyone who tried to help me.