{ "$schema": "https://raw.githubusercontent.com/guitaripod/wwdc-sessions/master/schema/session.schema.json", "schemaVersion": 1, "id": "wwdc2026-303", "event": "wwdc2026", "eventName": "WWDC26", "year": 2026, "eventContentId": 303, "title": "Build a responsive camera app that launches quickly", "description": "Discover how to build a camera app that launches instantly so people never miss the perfect shot. Explore how to optimize the entire camera launch sequence — from app startup to first preview frame. Ensure your app has a polished camera experience by learning about new API’s that deliver faster launches, and best practices for smooth preview rendering and maintaining sustainable performance.", "url": "https://developer.apple.com/videos/play/wwdc2026/303", "sosumiURL": "https://sosumi.ai/videos/play/wwdc2026/303", "type": "Video", "publishedAt": "2026-06-08T14:00:00-07:00", "platforms": [ "iOS", "iPadOS" ], "keywords": [], "topics": [ "Audio & Video", "Photos & Camera" ], "primaryTopic": "Photos & Camera", "duration": 1520, "hasTranscript": true, "transcriptWordCount": 2754, "availableLanguages": [ "eng", "fra", "jpn", "kor", "por", "spa", "zho" ], "media": { "hls": "https://devstreaming-cdn.apple.com/videos/wwdc/2026/303/5/fb6dc55a-c026-4ce1-9902-7a744fef4c99/cmaf.m3u8", "downloadHLS": "https://devstreaming-cdn.apple.com/videos/wwdc/2026/303/5/fb6dc55a-c026-4ce1-9902-7a744fef4c99/cmaf-download.m3u8", "downloadSD": "https://devstreaming-cdn.apple.com/videos/wwdc/2026/303/5/fb6dc55a-c026-4ce1-9902-7a744fef4c99/downloads/wwdc2026-303_sd.mp4", "downloadHD": "https://devstreaming-cdn.apple.com/videos/wwdc/2026/303/5/fb6dc55a-c026-4ce1-9902-7a744fef4c99/downloads/wwdc2026-303_hd.mp4", "duration": 1520 }, "codeSnippets": [ { "title": "Automatic deferred start delegate", "language": "swift", "startTimeSeconds": 554, "code": "import AVFoundation\n\nclass DeferredStartDelegate: NSObject, AVCaptureSessionDeferredStartDelegate {\n func sessionWillRunDeferredStart(_ session: AVCaptureSession)\n {\n // This is called before deferred start begins for the deferred outputs\n }\n\n func sessionDidRunDeferredStart(_ session: AVCaptureSession)\n {\n // This is called after deferred start completes for all outputs\n }\n}" }, { "title": "Adopt automatic deferred start", "language": "swift", "startTimeSeconds": 586, "code": "import AVFoundation\n\nlet captureSession = AVCaptureSession()\ncaptureSession.beginConfiguration()\ncaptureSession.automaticallyRunsDeferredStart = true\n\nlet videoPreviewLayer = AVCaptureVideoPreviewLayer(session: captureSession)\nvideoPreviewLayer.isDeferredStartEnabled = false\n\nlet photoOutput = AVCapturePhotoOutput()\nphotoOutput.isDeferredStartEnabled = true\ncaptureSession.addOutput(photoOutput)\n\ncaptureSession.setDeferredStartDelegate(deferredStartDelegate, deferredStartDelegateCallbackQueue: sessionQueue)\n\ncaptureSession.commitConfiguration()\ncaptureSession.startRunning()" }, { "title": "Adopt manual deferred start", "language": "swift", "startTimeSeconds": 690, "code": "import AVFoundation\n\nlet captureSession = AVCaptureSession()\ncaptureSession.beginConfiguration()\ncaptureSession.automaticallyRunsDeferredStart = false\n\nlet videoOutput = AVCaptureVideoDataOutput()\ncaptureSession.addOutput(videoOutput)\nvideoOutput.isDeferredStartEnabled = false\n\nlet photoOutput = AVCapturePhotoOutput()\nphotoOutput.isDeferredStartEnabled = true\ncaptureSession.addOutput(photoOutput)\n\ncaptureSession.setDeferredStartDelegate(deferredStartDelegate, deferredStartDelegateCallbackQueue: sessionQueue)\n\ncaptureSession.commitConfiguration()\ncaptureSession.startRunning()" }, { "title": "Manage runDeferredStartWhenNeeded", "language": "swift", "startTimeSeconds": 713, "code": "import AVFoundation\nimport QuartzCore\n\nprivate var firstFramePresented = false\nguard let drawable = layer.nextDrawable()\nif (!firstFramePresented) {\n drawable.addPresentedHandler({ drawable in\n // Set up postponed UI elements\n captureSession.runDeferredStartWhenNeeded()\n })\n firstFramePresented = true\n}" }, { "title": "Enable responsive capture", "language": "swift", "startTimeSeconds": 847, "code": "import AVFoundation\n\nfunc configurePhotoOutput(for session: AVCaptureSession, device: AVCaptureDevice) {\n let photoOutput = AVCapturePhotoOutput()\n\n guard session.canAddOutput(photoOutput) else { return }\n session.addOutput(photoOutput)\n\n photoOutput.maxPhotoQualityPrioritization = .quality\n // Responsive capture lets the photo output capture immediately\n photoOutput.isResponsiveCaptureEnabled = photoOutput.isResponsiveCaptureSupported\n}" }, { "title": "Monitor for system pressure", "language": "swift", "startTimeSeconds": 1216, "code": "import AVFoundation\n\nlet captureSession = AVCaptureSession()\nlet device = activeVideoInput?.device\ncaptureSession.beginConfiguration()\n// ...\ncaptureSession.commitConfiguration()\n\nguard captureSession.hardwareCost <= 1.0 else {\n print(\"hardwareCost \\(captureSession.hardwareCost) — cannot start session. Reconfiguring.\")\n setupLowCostConfiguration()\n}\n\ncaptureSession.startRunning()\nlet systemPressureObserver = device?.observe(\\.systemPressureState,\n options: [.initial, .new],\n changeHandler: { /* Handle state change */ })" }, { "title": "Manage pro video storage", "language": "swift", "startTimeSeconds": 1337, "code": "import AVFoundation\n\nfunc configureProVideoStorage() {\n guard AVProVideoStorage.isSupported else { return }\n let storage = AVProVideoStorage.shared\n guard storage.remainingCapacity != 0 else {\n storage.openSettings()\n return\n }\n}" }, { "title": "Adopt AVProVideoStorage for deterministic file write speeds", "language": "swift", "startTimeSeconds": 1363, "code": "import AVFoundation\n\nguard AVProVideoStorage.isSupported else { return }\nguard let pvs = AVProVideoStorage.shared else { return }\n\n// Configure and set up AVCaptureSession, AVCaptureConnections and format\n// ...\nlet movieOutput = AVCaptureMovieFileOutput()\n\nguard movieOutput.isProVideoStorageSupported else { return }\nguard !pvs.isBusy else { return }\n\nlet movieFileURL = FileManager.default.temporaryDirectory\n .appendingPathComponent(UUID().uuidString)\n .appendingPathExtension(\"mov\")\n\nmovieOutput.usesProVideoStorage = true // Also available with AVAssetWriter\nmovieOutput.startRecording(to: movieFileURL, recordingDelegate: delegate)" } ], "resources": [ { "title": "Build a responsive camera app that launches quickly", "url": "https://developer.apple.com/documentation/AVFoundation/build-a-responsive-camera-app-that-launches-quickly", "type": "samplecode", "description": "Build a fast camera launch experience for your iOS and iPadOS apps.", "sosumiURL": "https://sosumi.ai/documentation/AVFoundation/build-a-responsive-camera-app-that-launches-quickly", "doccJSON": "https://developer.apple.com/tutorials/data/documentation/AVFoundation/build-a-responsive-camera-app-that-launches-quickly.json" }, { "title": "Performance and metrics", "url": "https://developer.apple.com/documentation/Xcode/performance-and-metrics", "type": "documentation", "description": "Measure, investigate, and address the use of system resources and issues impacting performance using Instruments and Xcode Organizer.", "sosumiURL": "https://sosumi.ai/documentation/Xcode/performance-and-metrics", "doccJSON": "https://developer.apple.com/tutorials/data/documentation/Xcode/performance-and-metrics.json" }, { "title": "AVCam: Building a camera app", "url": "https://developer.apple.com/documentation/AVFoundation/avcam-building-a-camera-app", "type": "samplecode", "description": "Capture photos and record video using the front and rear iPhone and iPad cameras.", "sosumiURL": "https://sosumi.ai/documentation/AVFoundation/avcam-building-a-camera-app", "doccJSON": "https://developer.apple.com/tutorials/data/documentation/AVFoundation/avcam-building-a-camera-app.json" } ], "path": "sessions/wwdc2026/303-build-a-responsive-camera-app-that-launches-quickly/", "files": { "metadata": "sessions/wwdc2026/303-build-a-responsive-camera-app-that-launches-quickly/metadata.json", "readme": "sessions/wwdc2026/303-build-a-responsive-camera-app-that-launches-quickly/README.md", "transcript": "sessions/wwdc2026/303-build-a-responsive-camera-app-that-launches-quickly/transcript.md", "transcriptJSON": "sessions/wwdc2026/303-build-a-responsive-camera-app-that-launches-quickly/transcript.json" } }