Hand tracking permission (VisionOS)

Hello.

I'm creating a fully immersive application and I need to use hand tracking. I've included the corresponding key (SHandsTrackingUsageDescription) in the info.plist. Everything works correctly. At the beginning, the application displays the corresponding permission. But now here's the question: if I make a mistake and you click on Don't Allow, the permission prompt won't appear again and the application stops working. How can I request permission again?

Thanks.

Replies

This can be handled at the app level. You can write your handler for the case where the permission is denied, and request permission again by running session.requestAuthorization(for:) again, perhaps as the result of the user clicking a button on an alert dialog explaining why the permission is necessary to use the app.