iOS 26+ introduces a Deferred Start API for AVCaptureSession that postpones initialization of non-preview outputs (like photo and movie outputs) until after the first preview frame renders, dramatically cutting camera app launch times.
โข Reduces camera app launch time by up to 2x โ only the preview output initializes before first frame, all other outputs initialize in the background
โข Responsive Capture (isResponsiveCaptureEnabled) pairs with deferred start so users can still take photos immediately even before the photo output fully initializes
โข Automatic and manual modes give developers flexibility: automatic triggers deferred init right after preview appears, manual lets you choose the exact moment
Demonstrates configuring AVCaptureSession with deferred start so only the preview layer initializes at launch, while the photo output initializes in the background after preview appears.
import AVFoundation
import UIKit
class FastCameraViewController: UIViewController {
private let session = AVCaptureSession()
private let photoOutput = AVCapturePhotoOutput()
private let previewLayer = AVCaptureVideoPreviewLayer()
private let sessionQueue = DispatchQueue(label: "com.example.sessionQueue")
override func viewDidLoad() {
super.viewDidLoad()
setupPreviewLayer()
sessionQueue.async { self.configureSession() }
}
private func setupPreviewLayer() {
previewLayer.videoGravity = .resizeAspectFill
previewLayer.frame = view.bounds
view.layer.insertSublayer(previewLayer, at: 0)
}
private func configureSession() {
session.beginConfiguration()
// Automatic deferred start is enabled by default when compiled
// against iOS 26+ SDK, but set it explicitly for clarity.
session.automaticallyRunsDeferredStart = true
// Add camera input
guard
let device = AVCaptureDevice.default(.builtInWideAngleCamera,
for: .video,
position: .back),
let input = try? AVCaptureDeviceInput(device: device),
session.canAddInput(input)
else { return }
session.addInputWithNoConnections(input)
// Configure preview layer โ NOT deferred, needed for first frame
previewLayer.setSessionWithNoConnection(session)
if let videoPort = input.ports(for: .video,
sourceDeviceType: device.deviceType,
sourceDevicePosition: device.position).first {
let previewConnection = AVCaptureConnection(inputPort: videoPort,
videoPreviewLayer: previewLayer)
session.addConnection(previewConnection)
}
// Configure photo output โ DEFER it, not needed for preview
if session.canAddOutput(photoOutput) {
session.addOutput(photoOutput)
// Defer this output so it doesn't block first preview frame
photoOutput.isDeferredStartEnabled = true
// Allow captures even before deferred init completes
photoOutput.isResponsiveCaptureEnabled = true
}
session.commitConfiguration()
// Attach delegate to receive deferred start callbacks
session.deferredStartDelegate = self
session.startRunning()
}
}
extension FastCameraViewController: AVCaptureSessionDeferredStartDelegate {
func captureSessionWillRunDeferredStart(_ session: AVCaptureSession) {
// Called just before deferred outputs begin initializing
print("Deferred start beginning โ preview already visible")
}
func captureSessionDidRunDeferredStart(_ session: AVCaptureSession) {
// All deferred outputs are now fully initialized
DispatchQueue.main.async {
print("Photo output ready โ show remaining UI elements now")
}
}
}MetricKit has been rebuilt from the ground up in iOS 27 with a contextually rich, Swift-first API that delivers metrics and diagnostics as async streams, plus new capabilities like Metal frame rate metrics, memory exception diagnostics, and per-state metric breakdowns via the StateReporting framework.
Instruments 27 introduces Run Comparisons โ a new mode that directly diffs two profiling traces side-by-side in a single document to calculate exact performance deltas โ alongside the new Top Functions analysis mode that merges scattered call-tree nodes by self-weight to instantly surface the costliest functions regardless of call hierarchy.
iOS 27 rebuilds MetricKit from the ground up with a modern, Swift-first API that delivers metric and diagnostic reports via async streams, adds Metal frame rate metrics, memory exception diagnostics, and crash termination categories, plus a new StateReporting framework to contextualize metrics by app state.
If isResponsiveCaptureEnabled is not set on AVCapturePhotoOutput alongside deferred start, users may miss shots because the photo output isn't ready yet when they tap the shutter. Also, apps using AVCaptureVideoDataOutput for preview rendering should use manual mode and call runDeferredStartWhenNeeded() only after the first frame is presented.
Requires devices running iOS 26 or later; no specific hardware restriction beyond standard camera support
iOS/macOS 27 introduces the StateReporting API and look-back trace collection tools, letting developers annotate game state (levels, graphics settings, network) directly into Metal performance traces and retroactively collect hours of performance data without pre-instrumentation.