---
title: ARView
framework: realitykit
role: symbol
role_heading: Class
path: realitykit/arview
---

# ARView

A view that enables you to display an AR experience with RealityKit.

## Declaration

```swift
@MainActor @objc @preconcurrency class ARView
```

## Mentioned in

Handling different-sized objects in physics simulations Implementing postprocess effects using Metal compute functions Applying core image filters as a postprocess effect Designing scene hierarchies for efficient physics simulation Implementing systems for entities in a scene Loading remote assets in multiplayer apps Implementing scene understanding and reconstruction in your RealityKit app Using Metal performance shaders to create custom postprocess effects

## Overview

Overview Use an ARView instance to display rendered 3D graphics to the user. You typically add a single view to your app’s storyboard, and then provide an outlet for that view in your code. Alternatively, you can create and add a view to your view hierarchy programmatically at runtime, as you would any other view. A view has a single Scene instance that you access through the read-only scene property. To the view’s Scene instance you add one or more AnchorEntity instances that tell the view’s AR session how to tether content to something in the real world. To each anchor, you attach a hierarchy of other Entity instances that make up the content of the scene.

Additionally, you can use the view to: Configure render options, environmental characteristics, and the camera mode. Handle platform-appropriate user interaction in the form of mouse, keyboard, or gesture input. Find entities at a given point in the view. Access statistics and visualizations that help you debug your app. Note that with ARView, a ModelEntity casts a grounding shadow on a physical surface by default.  RealityView does not have this default behavior.

## Topics

### Creating a view

- [init(frame:)](realitykit/arview/init(frame:).md)
- [init(frame:cameraMode:automaticallyConfigureSession:)](realitykit/arview/init(frame:cameramode:automaticallyconfiguresession:).md)
- [init(coder:)](realitykit/arview/init(coder:).md)
- [init(frame:cameraMode:)](realitykit/arview/init(frame:cameramode:).md)

### Working with the scene

- [scene](realitykit/arview/scene.md)

### Configuring the AR session

- [session](realitykit/arview/session.md)
- [automaticallyConfigureSession](realitykit/arview/automaticallyconfiguresession.md)
- [renderOptions](realitykit/arview/renderoptions-swift.property.md)
- [renderCallbacks](realitykit/arview/rendercallbacks-swift.property.md)

### Providing environmental context

- [environment](realitykit/arview/environment-swift.property.md)
- [physicsOrigin](realitykit/arview/physicsorigin.md)
- [audioListener](realitykit/arview/audiolistener.md)

### Managing the camera

- [cameraMode](realitykit/arview/cameramode-swift.property.md)
- [cameraTransform](realitykit/arview/cameratransform.md)

### Finding entities at a point in the view

- [entity(at:)](realitykit/arview/entity(at:).md)
- [entities(at:)](realitykit/arview/entities(at:).md)
- [hitTest(_:query:mask:)](realitykit/arview/hittest(_:query:mask:).md)
- [hitTest(_:types:)](realitykit/arview/hittest(_:types:).md)
- [makeRaycastQuery(from:allowing:alignment:)](realitykit/arview/makeraycastquery(from:allowing:alignment:).md)
- [raycast(from:allowing:alignment:)](realitykit/arview/raycast(from:allowing:alignment:).md)
- [trackedRaycast(from:allowing:alignment:updateHandler:)](realitykit/arview/trackedraycast(from:allowing:alignment:updatehandler:).md)

### Adding gesture recognizers to entities

- [installGestures(_:for:)](realitykit/arview/installgestures(_:for:).md)
- [gestureRecognizer(_:shouldRecognizeSimultaneouslyWith:)](realitykit/arview/gesturerecognizer(_:shouldrecognizesimultaneouslywith:).md)

### Mapping between coordinate spaces

- [project(_:)](realitykit/arview/project(_:).md)
- [unproject(_:ontoPlane:relativeToCamera:)](realitykit/arview/unproject(_:ontoplane:relativetocamera:).md)
- [unproject(_:ontoPlane:)](realitykit/arview/unproject(_:ontoplane:).md)
- [unproject(_:viewport:)](realitykit/arview/unproject(_:viewport:).md)
- [ray(through:)](realitykit/arview/ray(through:).md)

### Handling touch input

- [touchesBegan(_:with:)](realitykit/arview/touchesbegan(_:with:).md)
- [touchesMoved(_:with:)](realitykit/arview/touchesmoved(_:with:).md)
- [touchesEnded(_:with:)](realitykit/arview/touchesended(_:with:).md)
- [touchesCancelled(_:with:)](realitykit/arview/touchescancelled(_:with:).md)

### Handling keyboard input

- [acceptsFirstResponder](realitykit/arview/acceptsfirstresponder.md)
- [keyDown(with:)](realitykit/arview/keydown(with:).md)
- [keyUp(with:)](realitykit/arview/keyup(with:).md)

### Handling mouse input

- [mouseDown(with:)](realitykit/arview/mousedown(with:).md)
- [mouseDragged(with:)](realitykit/arview/mousedragged(with:).md)
- [mouseUp(with:)](realitykit/arview/mouseup(with:).md)
- [mouseMoved(with:)](realitykit/arview/mousemoved(with:).md)
- [rightMouseDown(with:)](realitykit/arview/rightmousedown(with:).md)
- [rightMouseDragged(with:)](realitykit/arview/rightmousedragged(with:).md)
- [rightMouseUp(with:)](realitykit/arview/rightmouseup(with:).md)
- [otherMouseDown(with:)](realitykit/arview/othermousedown(with:).md)
- [otherMouseDragged(with:)](realitykit/arview/othermousedragged(with:).md)
- [otherMouseUp(with:)](realitykit/arview/othermouseup(with:).md)
- [scrollWheel(with:)](realitykit/arview/scrollwheel(with:).md)

### Managing the view

- [frame](realitykit/arview/frame.md)
- [contentScaleFactor](realitykit/arview/contentscalefactor.md)
- [didMoveToSuperview()](realitykit/arview/didmovetosuperview().md)
- [didMoveToWindow()](realitykit/arview/didmovetowindow().md)
- [layoutSubviews()](realitykit/arview/layoutsubviews().md)
- [layout()](realitykit/arview/layout().md)
- [layerClass](realitykit/arview/layerclass.md)
- [makeBackingLayer()](realitykit/arview/makebackinglayer().md)
- [viewDidChangeBackingProperties()](realitykit/arview/viewdidchangebackingproperties().md)
- [viewDidMoveToSuperview()](realitykit/arview/viewdidmovetosuperview().md)

### Taking a snapshot

- [snapshot(saveToHDR:completion:)](realitykit/arview/snapshot(savetohdr:completion:)-66jzu.md)
- [snapshot(saveToHDR:completion:)](realitykit/arview/snapshot(savetohdr:completion:)-91ifk.md)
- [ARView.Image](realitykit/arview/image.md)

### Debugging the session

- [Improving the Performance of a RealityKit App](realitykit/improving-the-performance-of-a-realitykit-app.md)
- [debugOptions](realitykit/arview/debugoptions-swift.property.md)

### Structures

- [ARView.DebugOptions](realitykit/arview/debugoptions-swift.struct.md)
- [ARView.EntityGestures](realitykit/arview/entitygestures.md)
- [ARView.Environment](realitykit/arview/environment-swift.struct.md)
- [ARView.PostProcessContext](realitykit/arview/postprocesscontext.md)
- [ARView.RenderCallbacks](realitykit/arview/rendercallbacks-swift.struct.md)
- [ARView.RenderOptions](realitykit/arview/renderoptions-swift.struct.md)

### Instance Methods

- [gestureRecognizer(_:shouldReceive:)](realitykit/arview/gesturerecognizer(_:shouldreceive:).md)
- [snapshot(saveToHDR:completion:)](realitykit/arview/snapshot(savetohdr:completion:).md)

### Enumerations

- [ARView.CameraMode](realitykit/arview/cameramode-swift.enum.md)

### Default Implementations

- [ARSessionProviding Implementations](realitykit/arview/arsessionproviding-implementations.md)

## Relationships

### Inherits From

- [NSView](appkit/nsview.md)
- [UIView](uikit/uiview.md)

### Conforms To

- [ARSessionProviding](arkit/arsessionproviding.md)
- [CALayerDelegate](quartzcore/calayerdelegate.md)
- [CLBodyIdentifiable](corelocation/clbodyidentifiable.md)
- [CMBodyIdentifiable](coremotion/cmbodyidentifiable.md)
- [CVarArg](swift/cvararg.md)
- [Copyable](swift/copyable.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Escapable](swift/escapable.md)
- [Hashable](swift/hashable.md)
- [NSAccessibilityElementProtocol](appkit/nsaccessibilityelementprotocol.md)
- [NSAccessibilityProtocol](appkit/nsaccessibilityprotocol.md)
- [NSAnimatablePropertyContainer](appkit/nsanimatablepropertycontainer.md)
- [NSAppearanceCustomization](appkit/nsappearancecustomization.md)
- [NSCoding](foundation/nscoding.md)
- [NSDraggingDestination](appkit/nsdraggingdestination.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSStandardKeyBindingResponding](appkit/nsstandardkeybindingresponding.md)
- [NSTouchBarProvider](appkit/nstouchbarprovider.md)
- [NSUserActivityRestoring](appkit/nsuseractivityrestoring.md)
- [NSUserInterfaceItemIdentification](appkit/nsuserinterfaceitemidentification.md)
- [UIAccessibilityIdentification](uikit/uiaccessibilityidentification.md)
- [UIActivityItemsConfigurationProviding](uikit/uiactivityitemsconfigurationproviding.md)
- [UIAppearance](uikit/uiappearance.md)
- [UIAppearanceContainer](uikit/uiappearancecontainer.md)
- [UICoordinateSpace](uikit/uicoordinatespace.md)
- [UIDynamicItem](uikit/uidynamicitem.md)
- [UIFocusEnvironment](uikit/uifocusenvironment.md)
- [UIFocusItem](uikit/uifocusitem.md)
- [UIFocusItemContainer](uikit/uifocusitemcontainer.md)
- [UIGestureRecognizerDelegate](uikit/uigesturerecognizerdelegate.md)
- [UILargeContentViewerItem](uikit/uilargecontentvieweritem.md)
- [UIPasteConfigurationSupporting](uikit/uipasteconfigurationsupporting.md)
- [UIPopoverPresentationControllerSourceItem](uikit/uipopoverpresentationcontrollersourceitem.md)
- [UIResponderStandardEditActions](uikit/uiresponderstandardeditactions.md)
- [UITraitChangeObservable](uikit/uitraitchangeobservable-67e94.md)
- [UITraitEnvironment](uikit/uitraitenvironment.md)
- [UIUserActivityRestoring](uikit/uiuseractivityrestoring.md)

## See Also

### UIKit and AppKit presentation

- [ARView.DebugOptions](realitykit/arview/debugoptions-swift.struct.md)
- [ARViewBase](realitykit/arviewbase.md)
