0

I used Xamarin Forms 3.3 for my app. When debug app test on iOS.

My logs file always has 2 lines:

2019-01-13 21:19:59.575 Marine.Mobile.iOS[2751:542039] Currently does not have Location permissions, requesting permissions

2019-01-13 21:19:59.599 Marine.Mobile.iOS[2751:542039] 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

I set in file Info.plist as Location Service:

<key>NSLocationAlwaysAndWhenInUseUsageDescription</key>
<string>Marine requires GPS to track cars and job orders</string>
<key>NSLocationWhenInUseUsageDescription</key>
<string>Marine requires GPS to track cars and job orders</string>

but can't run or debug program.

It can't display name of project Image

And Error: Image Error

I try only use below code in file Info.plist:

<key>NSLocationWhenInUseUsageDescription</key>
<string>Marine requires GPS to track cars and job orders</string>

=> Project can run debug.

Then, I try don't use NSLocationWhenInUseUsageDescription and replace it with NSLocationWhenInUseUsageDescription, but program can't debug.

<key>NSLocationWhenInUseUsageDescription</key> <string>Marine requires GPS to track cars and job orders</string>

=> Why code can't add it in file Info.plist:

Please help me! Thanks!

Leks G
  • 43
  • 1
  • 1
  • 7

1 Answers1

0

Try this: Double tap in YourProject.iOS. Choose Configuration and Add new Configuration.

Huy Nguyen
  • 57
  • 9