mrousavy / react-native-vision-camera

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

💭 Disabled location showing an error log #2876

Closed ppanwin10 closed 5 months ago

ppanwin10 commented 5 months ago

Question

I disabled the location config by using $VCEnableLocation = false. And I received the following error message in console. Want to confirm that this error log can be ignored.

[system/location-not-enabled: Location is not enabled, so VisionCamera did not compile the Location APIs. Set $VCEnableLocation in your Podfile, or enableLocation in the expo config plugin and rebuild.]

What I tried

$VCEnableLocation = false.

enableLocation={false}

VisionCamera Version

4.0.3

Additional information

mrousavy commented 5 months ago

Hm, this error should only come when you set enableLocation={true}. Are you sure you are not passing true here?

ppanwin10 commented 5 months ago

Yes I am sure enableLocation={false} in my code.

I am not familiar with swift code but if I understand correctly, this error returns if VISION_CAMERA_ENABLE_LOCATION is off, even though configuration.enableLocation is false. Is there any problem here?

Screenshot 2024-05-14 at 10 45 58 AM

ppanwin10 commented 5 months ago

BTW, during my testing of location tagging in my app, I noticed that the saved photo doesn't include location information even I enabled location. I haven't tested it with the example app yet; I just wanted to see if anyone else encountered the same issue. For testing, I'm using an iPhone 11.

mrousavy commented 5 months ago

Ahhhh, configuration.enableLocation will be true because the device changed, that's all chained. I've created a PR to fix this: https://github.com/mrousavy/react-native-vision-camera/pull/2882