---
title: Setting up access to ARKit data
framework: visionos
role: article
role_heading: Article
path: visionos/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

Overview 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: note: World tracking — unlike world sensing — doesn’t require authorization. For more information, see Tracking specific 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 requestAuthorization(for:) method on ARKitSession to explicitly authorize access at the time you call it. Otherwise, people see an authorization request when you call the 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 run(_:) method. The following shows an app structure that’s set up to use a space with ARKit: @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 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: 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.

## See Also

### ARKit

- [Happy Beam](visionos/happybeam.md)
- [Incorporating real-world surroundings in an immersive experience](visionos/incorporating-real-world-surroundings-in-an-immersive-experience.md)
- [Placing content on detected planes](visionos/placing-content-on-detected-planes.md)
- [Tracking specific points in world space](visionos/tracking-points-in-world-space.md)
- [Tracking preregistered images in 3D space](visionos/tracking-images-in-3d-space.md)
- [Exploring object tracking with ARKit](visionos/exploring_object_tracking_with_arkit.md)
- [Object tracking with Reality Composer Pro experiences](visionos/object-tracking-with-reality-composer-pro-experiences.md)
- [Building local experiences with room tracking](visionos/building-local-experiences-with-room-tracking.md)
- [Placing entities using head and device transform](visionos/placing-entities-using-head-and-device-transform.md)
- [Drawing in the air and on surfaces with a spatial stylus](visionos/drawing-in-the-air-and-on-surfaces-with-a-spatial-stylus.md)
- [Preparing spatial accessories for tracking in your visionOS app](arkit/preparing-spatial-accessories-for-tracking-in-your-visionos-app.md)
- [Working with generic spatial accessories](visionos/working-with-generic-spatial-accessories.md)
