mapbox / mapbox-events-ios

Mapbox Events Framework for iOS
Other
20 stars 38 forks source link

🐞 ReactNative removing NSLocationAlwaysAndWhenInUseUsageDescription creates conflict with Apple submission #357

Closed Marquicas2 closed 1 year ago

Marquicas2 commented 1 year ago

Configuration

Steps to Reproduce We have recently integrated Mapbox sdk into our application. We encountered some problems when submitting the new bundle to Apple. Your sdk implements location tracking in the background, for which it is necessary to implement the Always option as location permission (NSLocationAlwaysAndWhenInUseUsageDescription). Although we removed in our application the possibility to select this option following some guidelines from your own package (https://github.com/mapbox/mapbox-events-ios#-foreground-and-background-location-collection) since we are not using this functionality, we have come into conflict with Apple, which suggests that we must attach this option if at least one external library is using it.

Expected We would like to know if there is a way to disable this option from your systems that would satisfy Apple's policies. We want to prevent the user from selecting the Always option because this causes a prompt on the screen that may cause suspicion among our users, even more so when we don't need this functionality for the purpose of our application.

Logging This is the issue from Apple we want to prevent:

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 "rodeo.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. For details, visit: https://developer.apple.com/documentation/uikit/protecting_the_user_s_privacy/requesting_access_to_protected_resources.

DorkMatter commented 1 year ago

Hi @Marquicas2, thanks for reaching out! Unfortunately there is no way to disable this, some apps need location tracking in background so we have to support it and cannot take it out. You'll have to include the purpose string, I'm sorry if this isn't documented well enough, I'll reach out to our docs folks about that.