hotdogsoup.nl
hotdogsoup.nl

Reputation: 2321

iOS 14 Widget not displaying NSLocationWhenInUseUsageDescription when asking location permission

I am using CoreLocation in my iOS 14 Widget to track the user's location. It works perfectly. As per documentation, I have added the NSLocationWhenInUseUsageDescriptionto the Widget's Info.plist file.

The system correctly asks for permission to acces the user's location the first time the widget is used.

However, the text string value is not displayed in the permission dialog. It simply displays the default system text (see image). Apple even goes so far as to reject my app because the dialog does not show my text string.

location permission dialog

<key>NSLocationWhenInUseUsageDescription</key>
<string>Your location is used to... blah blah.</string>

I have tried using the NSLocationAlwaysAndWhenInUseUsageDescription key and have also tried to use both keys, but no string is being displayed.

What's missing here?

Upvotes: 0

Views: 1249

Answers (1)

bittybite
bittybite

Reputation: 25

I ran into the same issues and I did set all these keys in the widgets info.plist. Though it's weird because I don't think it shows the text anytime...

Xcode iOS 14 Widget info.plist Screenshot

Upvotes: 1

Related Questions