olexale / arkit_flutter_plugin

ARKit Flutter Plugin
MIT License
798 stars 228 forks source link

Sensor failed #210

Open Swepilot opened 1 year ago

Swepilot commented 1 year ago

I am using ARKit in a Stack widget where I also have the flutter Camera. I understand the issue with both ARKit and Camera accessing the camera feed and I e.g. cannot capture any image with Camera when the ARKitSceneView is in the widget tree (I'm experimenting so that's fine, but if someone has a solution to this, I'm interested to hear that.)

Other features work, like measuring distance to objects and displaying it on the screen, as per the example so that's nice. However, as soon as restart the app in VS Code I get the following error:

ARSession <0x1070f3850>: did fail with error: Error Domain=com.apple.arkit.error Code=102 "Required sensor failed." UserInfo={NSLocalizedFailureReason=A sensor failed to deliver the required input., NSUnderlyingError=0x281dae2e0 {Error Domain=AVFoundationErrorDomain Code=-11800 "The operation could not be completed" UserInfo={NSLocalizedFailureReason=An unknown error occurred (-12780), NSLocalizedDescription=The operation could not be completed, NSUnderlyingError=0x281dadb30 {Error Domain=NSOSStatusErrorDomain Code=-12780 "(null)"}}}, NSLocalizedRecoverySuggestion=Make sure that the application has the required privacy settings., NSLocalizedDescription=Required sensor failed.}

After that ARKit is unavilable until I close the app and rebuild. It obviously have the correct privacy settings as it works the first time.

Any ideas?