📐

ARKit

iOS 11+

Apple's augmented reality framework for creating immersive AR experiences. ARKit combines device motion tracking, camera scene capture, and advanced scene processing to create AR applications.

AR & VR
Official Apple Documentation →
iOS Version Compatibility
99.5%
coverage

of iOS users worldwide can use ARKit (iOS 11+ required)

iOS VersionMarket ShareStatus
iOS 18.730.3%Supported
iOS 18.629.8%Supported
iOS 26.110.7%Supported
iOS 18.56.0%Supported
iOS 16.72.3%Supported
iOS 26.22.0%Supported
iOS 18.31.8%Supported
iOS 15.81.8%Supported
iOS 11.01.7%Supported
iOS 17.61.7%Supported

Key Features

World tracking and plane detection

Face tracking and expression capture

Image detection and tracking

Object scanning and detection

People occlusion and body tracking

RealityKit integration for rendering

Code Examples

Basic AR Session

Set up a basic ARKit session with world tracking

import ARKit

class ViewController: UIViewController {
    var sceneView: ARSCNView!
    
    override func viewDidLoad() {
        super.viewDidLoad()
        
        sceneView = ARSCNView(frame: view.bounds)
        view.addSubview(sceneView)
        
        let configuration = ARWorldTrackingConfiguration()
        configuration.planeDetection = [.horizontal, .vertical]
        
        sceneView.session.run(configuration)
    }
    
    override func viewWillDisappear(_ animated: Bool) {
        super.viewWillDisappear(animated)
        sceneView.session.pause()
    }
}

Place 3D Object

Add a 3D object to the AR scene

import ARKit
import SceneKit

func addBox(at position: SCNVector3) {
    let box = SCNBox(width: 0.1, height: 0.1, length: 0.1, chamferRadius: 0)
    
    let material = SCNMaterial()
    material.diffuse.contents = UIColor.blue
    box.materials = [material]
    
    let boxNode = SCNNode(geometry: box)
    boxNode.position = position
    
    sceneView.scene.rootNode.addChildNode(boxNode)
}

// Usage: Place box 1 meter in front of camera
let cameraPosition = sceneView.pointOfView?.position ?? SCNVector3(0, 0, 0)
let boxPosition = SCNVector3(cameraPosition.x, cameraPosition.y, cameraPosition.z - 1)
addBox(at: boxPosition)

Detect Planes

Handle detected AR planes

import ARKit

extension ViewController: ARSCNViewDelegate {
    func renderer(_ renderer: SCNSceneRenderer, didAdd node: SCNNode, for anchor: ARAnchor) {
        guard let planeAnchor = anchor as? ARPlaneAnchor else { return }
        
        let width = CGFloat(planeAnchor.planeExtent.width)
        let height = CGFloat(planeAnchor.planeExtent.height)
        let plane = SCNPlane(width: width, height: height)
        
        plane.materials.first?.diffuse.contents = UIColor.blue.withAlphaComponent(0.3)
        
        let planeNode = SCNNode(geometry: plane)
        planeNode.eulerAngles.x = -.pi / 2
        planeNode.position = SCNVector3(planeAnchor.center.x, 0, planeAnchor.center.z)
        
        node.addChildNode(planeNode)
    }
}

Frequently Asked Questions

What is ARKit?

Apple's augmented reality framework for creating immersive AR experiences. ARKit combines device motion tracking, camera scene capture, and advanced scene processing to create AR applications.

Which iOS versions support ARKit?

ARKit is available on iOS 11 and later. Currently, 99.5% of iOS users worldwide can use this framework.

What are alternatives to ARKit?

Related frameworks include Realitykit, Scenekit. Each has different capabilities and iOS version requirements.