Forum Xamarin.Forms
We are excited to announce that the Xamarin Forums are moving to the new Microsoft Q&A experience. Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

We encourage you to head over to Microsoft Q&A for .NET for posting new questions and get involved today.

NSLocationAlwaysUsageDescription required - but the app doesn't use location services..!

DaveCarsonDaveCarson GBUniversity ✭✭✭

I've just uploaded an iOS app (written using Xamarin forms 3.1) to the App Store and received an email that stated:

"_Your delivery was successful, but you may wish to correct the following issues in your next delivery

Your app's code references one or more APIs that access sensitive user data. The app's Info.plist file should contain a NSLocationAlwaysUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data._"

While it is quite descriptive, explaining what is wrong, why it is wrong and how to fix it, my app doesn't use and of the Location APIs - it doesn't need them at all.

This was only an information message and it did not prevent the app from being uploaded I did receive a similar email after a previous upload which referred to a missing 'NSCalendarsUsageDescription' key and that did fail the process. Once again, my app does not access the users calendar in any way but I had to add the key with some text, I used 'this app does not require this permission!', to get the app uploaded.

I am using a couple of plugins within the app, Xam.Plugin.Media and it's dependancy Plugin.Permissions as well as the AppCenter Analytics and Crashes packages. But I'm only using these to take photos, gather analytics and report crashes - nothing directly to do with the Calendar or Location.

I can easily add the specified keys to the info.plist but I'd like to know what it causing this issue - it didn't happen with a previous Xamarin.Forms application that I uploaded a month or so ago.

Can anyone point me in the direction of some documentation (I've Googled around but not found anything helpful so far) or a tool that I can use to determine the source of these apparently calls to the Calendar and Location APIs.

Best Answer

Answers

  • DaveCarsonDaveCarson GBUniversity ✭✭✭

    Looks like I'm not the only one experiencing this issue and it doesn't seem to be related to Xamarin.Forms or the plugins I'm using.

    Looking at the Apple Developer System Status page it looks like there were problems with App Store Connect and TestFlight recently but Apple don't seem to think it important to say what the issues were - just that they've been fixed - so I don't know if it was cause of my problems.

    I think that the workaround is to just put some bogus text into the info.plist entry and cross my fingers ;-)

  • BushbertBushbert Member ✭✭✭

    Yeah I mean sticking those keys in will get around it. Its just a little annoying I guess.

  • RashunMosleyRashunMosley USMember

    I had a space in the "Declaration"

    NSCalendarsUsageDescription

    Validate there are no spaces.

Sign In or Register to comment.