<!--
{
  "documentType" : "article",
  "framework" : "visionOS",
  "identifier" : "/documentation/visionOS/setting-up-access-to-arkit-data",
  "metadataVersion" : "0.1.0",
  "role" : "article",
  "title" : "Setting up access to ARKit data"
}
-->

# Setting up access to ARKit data

Check whether your app can use ARKit and respect people’s privacy.

## Overview

In visionOS, ARKit can enable new kinds of experiences that leverage data such as hand tracking and world sensing. The system gates access to this kind of sensitive information. Because people can decline your app’s request to use ARKit data or revoke access later, you need to provide alternative ways to use your app and to handle cases where your app loses access to data.



![A screenshot that shows the system permission alert for hand tracking. The options are Don't Allow and OK. The app-specific usage description is Track your hands to detect a heart gesture.](images/com.apple.visionOS/request-data@2x.png)

### Add usage descriptions for ARKit data access

People need to know why your app wants to access data from ARKit. Add the following keys to your app’s information property list to provide a user-facing usage description that explains how your app uses the data:

- <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/NSHandsTrackingUsageDescription>: Use this key if your app uses hand tracking.
- <doc://com.apple.documentation/documentation/BundleResources/Information-Property-List/NSWorldSensingUsageDescription>: Use this key if your app uses image tracking, plane detection, or scene reconstruction.

> Note: World *tracking* — unlike world *sensing* — doesn’t require authorization. For more information, see <doc://com.apple.visionOS/documentation/visionOS/tracking-points-in-world-space>.

### Choose between up-front or as-needed authorization

You can choose when someone sees an authorization request to use ARKit data. If you need precise control over when the request appears, call the <doc://com.apple.documentation/documentation/ARKit/ARKitSession/requestAuthorization(for:)> method on <doc://com.apple.documentation/documentation/ARKit/ARKitSession> to explicitly authorize access at the time you call it. Otherwise, people see an authorization request when you call the <doc://com.apple.documentation/documentation/ARKit/ARKitSession/run(_:)> method. This is an implicit authorization because the timing of the request depends entirely on when you start the session.

### Open a space and run a session

To help protect people’s privacy, ARKit data is available only when your app presents a Full Space and other apps are hidden. Present one of these space styles before calling the <doc://com.apple.documentation/documentation/ARKit/ARKitSession/run(_:)> method.

The following shows an app structure that’s set up to use a space with ARKit:

```swift
@main
struct MyApp: App {
    @State var session = ARKitSession()
    @State var immersionState: ImmersionStyle = .mixed
    var body: some Scene {
        WindowGroup {
            ContentView()
        }
        ImmersiveSpace(id: "appSpace") {
            MixedImmersionView()
            .task {
                let planeData = PlaneDetectionProvider(alignments: [.horizontal])
                
                if PlaneDetectionProvider.isSupported {
                    do {
                        try await session.run([planeData])
                        for await update in planeData.anchorUpdates {
                            // Update app state.
                        }
                    } catch {
                        print("ARKit session error \(error)")
                    }
                }
            }
        }
        .immersionStyle(selection: $immersionState, in: .mixed)
    }
}
```

Call <doc://com.apple.documentation/documentation/SwiftUI/EnvironmentValues/openImmersiveSpace> from your app’s user interface to create a space, start running an ARKit session, and kick off an immersive experience. The following shows a simple view with a button that opens the space:

```swift
struct ContentView: View {
    @Environment(\.openImmersiveSpace) private var openImmersiveSpace
    
    var body: some View {
        Button("Start ARKit experience") {
            Task {
                await openImmersiveSpace(id: "appSpace")
            }
        }
    }
}
```

### Provide alternatives for declined and revoked authorizations

Someone might not want to give your app access to data from ARKit, or they might choose to revoke that access later in Settings. Handle these situations gracefully, and remove or transition content that depends on ARKit data. For example, you might fade out content that you need to remove, or recenter content to an appropriate starting position. If your app uses ARKit data to place content in a person’s surroundings, consider letting people place content using the system-provided interface.

Providing alternatives is especially important if you’re using ARKit for user input. People using accessibility features, trackpads, keyboards, or other forms of input might need a way to use your app without ARKit.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)