mrousavy / react-native-vision-camera

📸 A powerful, high-performance React Native Camera library.
https://react-native-vision-camera.com
MIT License
7.22k stars 1.06k forks source link

đź’­ Get "Missing purpose string" Apple violation when VCEnableLocation is false #2982

Closed ppanwin10 closed 2 months ago

ppanwin10 commented 2 months ago

Question

Hi,

I still receive the 'Missing purpose string' violation notice even after disabling the location service as per the documentation.

The Apple review notice: "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 “TalkingCamera.app” bundle should contain a NSLocationWhenInUseUsageDescription 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."

Has anyone else encountered this problem?

What I tried

Podfile:

... target 'PackageName' do config = use_native_modules!

use_frameworks! :linkage => :static
$RNFirebaseAsStaticFramework = true
$RNGoogleMobileAdsAsStaticFramework = true

$VCEnableLocation = false

...

VisionCamera Version

4.0.5

Additional information

maintenance-hans[bot] commented 2 months ago

Guten Tag, Hans here.

[!NOTE] New features, bugfixes, updates and other improvements are all handled mostly by @mrousavy in his free time. To support @mrousavy, please consider đź’– sponsoring him on GitHub đź’–. Sponsored issues will be prioritized.

mrousavy commented 2 months ago

Can you ask Apple which key/method signature is offending their tests? I compile out the CLLocationManager.authorizationStatus API which I thought was enough, but maybe they even check for more than that?

This is the code I have:

https://github.com/mrousavy/react-native-vision-camera/blob/0a74a84f3dd52c3aeae06002c9c4dcb8f620c1af/package/ios/Core/LocationProvider.swift#L8-L53

Can you ask them which part of that should be compiled out so that it doesn't offend their tests anymore?

ppanwin10 commented 2 months ago

Great news! My app just passed the release review. It seems that the "Missing purpose string" warning only appears during the TestFlight review. So, if anyone else encounters this issue, you can ignore it and proceed with your release.