Description
My team recently updated to @capacitor/android
7.1.0 and @capacitor/geolocation
7.1.1. When we submitted our iOS app for App Store review, we received the following ITMS-90683
warning:
ITMS-90683: Missing purpose string in Info.plist - Your app’s code references one or more APIs that access sensitive user data, or the app has one or more entitlements that permit such access. The Info.plist file for the “App.app” bundle should contain a NSLocationAlwaysAndWhenInUseUsageDescription key with a user-facing purpose string explaining clearly and completely why your app needs the data. If you’re using external libraries or SDKs, they may reference APIs that require a purpose string. While your app might not use these APIs, a purpose string is still required.
This was confusing because, as far as I know, @capacitor/geolocation
doesn’t support the “always” location permission. Comments like this and this support my understanding. We are not running @capacitor/background-runner
or any “background mode” capabilities in Xcode, so I know we aren’t secretly requesting background location permissions anywhere.
However, the README for @capacitor/geolocation
does state that the NSLocationAlwaysAndWhenInUseUsageDescription
permission is required:
capacitor-geolocation/README.md
Lines 14 to 19 in bacba5f
This appears to be a recent change, as the older README in the capacitor-plugins repo only mentions NSLocationWhenInUseUsageDescription
(as I’d expect). It's possible that another plugin or dependency is causing our problem, but this README change makes me think the issue lies somewhere with the latest version of @capacitor/geolocation
.
My questions are:
- Why is
NSLocationAlwaysAndWhenInUseUsageDescription
now required by this plugin even if background location is not requested (or possible)? - If this isn’t a bug, what’s the best way to address this? Theoretically, this should never be shown to the user, so should we just copy the value we have for
NSLocationWhenInUseUsageDescription
? (I'm not sure Apple will accept that.) Is there a change we can make to remove the requirement for this? - If this is a red herring and
NSLocationAlwaysAndWhenInUseUsageDescription
isn't actually required for this plugin, can it be removed from the README?
Thank you for your time!