Apple's November 12, 2026 Secure Exclaves post says the camera and microphone indicators on its newest devices are controlled from an isolated runtime that apps, the main OS and Apple cannot reach, and that sensor data only flows once the indicator has been visible. No API changes, but an app that leaves capture running now shows it in a way it cannot hide. Give the capture session one owner on a serial queue, stop it when the screen goes away or the app leaves the foreground, deactivate the audio session after recording, and check the dots on a real device.
On November 12, 2026, Apple's security research team published a long technical post called Secure Exclaves and Ambient Sensing. It describes isolated runtimes on Apple silicon that process camera and microphone data away from the main operating system. One line in it matters to anyone who ships an iOS app with a camera or a microphone feature: Apple now uses Secure Exclaves to protect the on-screen camera and microphone indicators on iPhone 18 Pro, iPhone 18 Pro Max and iPhone Duo, and the camera indicator on MacBook Neo.
The green and orange dots have been around since iOS 14. What changed is who controls them. On these devices the indicator logic lives in a separate, isolated environment that your app, the main OS and, according to Apple, Apple itself cannot reach. So if your app keeps the camera running on a screen where the user can't see a preview, or leaves the microphone open after a voice note is saved, the dot stays lit and nothing in software can hide it.
That has always been true in principle. The exclave design makes it harder to argue with. This post covers what Apple actually said, what it did not say, and then the practical part: how to find and fix the capture code in an AI-built iOS app that leaves the light on longer than it should.
What Apple published
The post was written by Apple's Security Engineering and Architecture team and the Core OS team. It describes Secure Exclaves as isolated runtimes for sensor data, built to support what Apple calls ambient sensing: the device listens or looks for a trigger and shares only a small result, such as whether a sound was heard or an enrolled person was recognized.
There are two modes. In ambient mode only limited metadata leaves the exclave. In active mode full camera or microphone data can flow to the main OS, and that is when the indicator must be on. Apple names the gatekeeper for that switch the Exclave Indicator Controller. In Apple's words, it "only allows data to flow after establishing that the indicator is activated" and that the indicator "has been visible for a sufficient amount of time".
Apple also states that "data that is processed and analyzed in a Secure Exclave cannot be accessed by the main operating system, apps, or Apple", and that drivers, daemons and applications running in Darwin "must call through the access management software in exclaveOS" to reach the sensors. The examples in the post are Apple's own features: Hey Siri detection on iPhone 18 Pro, person recognition on HomeView, Siri Recap and Live Rewind.
These are Apple's claims about its own design. The post says formal verification covers parts of the exclaves microkernel, not all of it, and nobody outside Apple has published an independent review yet.
What it does not change for your code
The post describes no new public API, no new entitlement, no new Info.plist key and no new App Review rule. Your app still asks for camera access through AVFoundation and for microphone access through AVFoundation or AVFAudio, and the same purpose strings still apply. Apple does not name the OS versions involved, and the post does not discuss older iPhones. If you read a headline that says Apple changed the camera API, it didn't.
Two details are worth keeping in mind anyway.
First, the "sufficient amount of time" line. Apple does not say how long that is. If any part of your code assumes the first camera frame or the first audio buffer arrives within a fixed number of milliseconds after you start a session, it already makes a bad assumption, and it is worth replacing the timer with a check for the first real sample. The delay may well be too short to notice; the post simply gives you no number to build on.
Second, the indicator is now the one part of the privacy story that your app can't influence at all. Users who notice the dot staying on after they leave your camera screen will connect it to your app, and a few of them will write the review.
The rules that already apply
Apple's App Review Guidelines already cover this ground. Guideline 2.5.14 says apps "must request explicit user consent and provide a clear visual and/or audible indication when recording, logging, or otherwise making a record of user activity," and it names the camera and the microphone. Guideline 5.1.1(ii) asks for purpose strings that "clearly and completely describe your use of the data." Guideline 5.1.1(iv) says apps must respect the user's permission settings and gives a direct example: an app that posts photos to a social network "must not also require microphone access before allowing the user to upload photos."
On the technical side, Apple's article Requesting authorization to capture and save media says your app needs NSCameraUsageDescription or NSMicrophoneUsageDescription in its Info.plist before it requests access or uses a capture device. Otherwise the system terminates your app. The same article tells you to call requestAccess(for:) only at a time that makes sense, for example when the user opens the camera feature, when capture isn't the main point of the app. Guideline 2.1 Rejection: Why Your AI-Built App Crashed in App Review shows how that crash looks from App Review's side.
None of this is new. What is new is how often AI coding tools generate capture code that breaks it in quiet ways. The patterns below are the first ones to look for in an app that Cursor, Claude Code, Bolt or Rork wrote.
Five ways AI-built apps leave the light on
1. The session starts in viewDidLoad and never stops
Generated camera code often creates an AVCaptureSession, calls startRunning() once when the view loads, and never calls stopRunning(). When the user pushes a settings screen on top, switches tabs or backgrounds the app, the session keeps going. On a phone with an exclave-protected indicator, the green dot stays on while the user is reading your settings page.
2. startRunning() on the main thread
Apple's AVCaptureSession documentation says startRunning() "is a blocking call which can take some time" and tells you to start the session on a serial dispatch queue so the main queue stays responsive. Generated code often calls it from a SwiftUI onAppear closure on the main actor. The visible result is a frozen screen for a moment, and some developers then add a delay or a retry loop around it, which makes the start and stop order harder to reason about.
3. The audio session is activated and never released
Voice notes, dictation and AI chat features usually activate AVAudioSession with a record category and then forget about it. Apple's documentation for setActive(_:options:) explains that deactivating a session with running audio objects stops them and returns an isBusy error, and the notifyOthersOnDeactivation option lets audio from other apps that your session interrupted resume. Code that never deactivates leaves the user's podcast paused and keeps the microphone path open longer than needed.
4. Permission prompts on first launch
A common generated onboarding flow asks for camera, microphone, photos, notifications and location on the first screens, before the user has touched a feature that needs any of them. Apple's own capture article advises against this, and guideline 5.1.1(iv) says you can't force consent for data access the feature doesn't need. Asking for the microphone in a photo app is the example Apple uses.
5. No interruption handling
Phone calls, Siri, another app taking the camera in multitasking and system pressure can all interrupt a capture session. AVFoundation posts wasInterruptedNotification and interruptionEndedNotification, and the reason is in the user info under AVCaptureSessionInterruptionReasonKey. Generated code rarely observes either, so after an interruption the preview goes black and the app's state still says "recording". Users then tap record again, and the app starts a second session on top of the first.
Step 1: find the capture code
Before changing anything, list every place your app touches the camera or microphone. The script below is a plain grep pass over Swift and Objective-C files. It checks Info.plist files for the two purpose strings, flags files that call startRunning but never stopRunning, flags files that activate an audio session but never deactivate it, lists every permission request, and says whether any interruption observer exists.
#!/usr/bin/env bash
# capture-audit.sh: list camera and microphone code paths in an iOS repo.
# Usage: ./capture-audit.sh /path/to/repo
set -u
ROOT="${1:-.}"
SRC_FILTER=(--include='*.swift' --include='*.m' --include='*.mm')
EXCLUDE=(--exclude-dir=Pods --exclude-dir=.build --exclude-dir=DerivedData --exclude-dir=node_modules --exclude-dir=Carthage)
echo "== Purpose strings in Info.plist files"
found_plist=0
while IFS= read -r plist; do
found_plist=1
for key in NSCameraUsageDescription NSMicrophoneUsageDescription; do
if grep -q "<key>$key</key>" "$plist"; then
echo " $plist: $key present"
else
echo " $plist: $key MISSING"
fi
done
done < <(find "$ROOT" -name 'Info.plist' -not -path '*/Pods/*' -not -path '*/.build/*' -not -path '*/DerivedData/*' -not -path '*/node_modules/*')
[ "$found_plist" -eq 0 ] && echo " no Info.plist found (check INFOPLIST_KEY_ build settings in the .pbxproj)"
grep -rhoE 'INFOPLIST_KEY_NS(Camera|Microphone)UsageDescription' "$ROOT" --include='*.pbxproj' 2>/dev/null | sort -u | sed 's/^/ build setting: /'
echo
echo "== Files that start capture but never stop it"
grep -rlE '\.startRunning\(\)|startRunning\]' "$ROOT" "${SRC_FILTER[@]}" "${EXCLUDE[@]}" 2>/dev/null | while IFS= read -r f; do
starts=$(grep -cE 'startRunning' "$f")
stops=$(grep -vE '^[[:space:]]*//' "$f" | grep -cE 'stopRunning')
if [ "$stops" -eq 0 ]; then
echo " $f: startRunning x$starts, stopRunning x0 <-- check this file"
else
echo " $f: startRunning x$starts, stopRunning x$stops"
fi
done
echo
echo "== Audio sessions activated without a matching deactivation"
grep -rlE 'setActive\(true' "$ROOT" "${SRC_FILTER[@]}" "${EXCLUDE[@]}" 2>/dev/null | while IFS= read -r f; do
if grep -qE 'setActive\(false' "$f"; then
echo " $f: activates and deactivates"
else
echo " $f: setActive(true) only <-- check this file"
fi
done
echo
echo "== Permission requests (where in the flow do they fire?)"
grep -rnE 'requestAccess\(for: *\.(video|audio)|requestRecordPermission' "$ROOT" "${SRC_FILTER[@]}" "${EXCLUDE[@]}" 2>/dev/null | sed 's/^/ /'
echo
echo "== Interruption handling"
if grep -rqE 'wasInterruptedNotification|AVCaptureSessionWasInterrupted|interruptionNotification' "$ROOT" "${SRC_FILTER[@]}" "${EXCLUDE[@]}" 2>/dev/null; then
echo " interruption observers found"
else
echo " no interruption observers found <-- add them"
fi
This script was tested on Linux against a small made-up repo with one leaky scanner file, one voice file that never deactivates, one correct file and an Info.plist missing the microphone key. It flagged all three problems and passed the correct file. It has not been run on a real app, and grep can't follow a session object passed between files, so read each flagged file before deciding it is broken. Projects that use Xcode's generated Info.plist keep purpose strings as INFOPLIST_KEY_ build settings in the project file, which is why the script greps the .pbxproj too.
Step 2: one owner for the camera
Most leaks happen because three views each own a piece of the session. Give the session one owner with a private serial queue, and make start and stop the only ways in. The class below follows Apple's documented pattern: check authorizationStatus(for:), request access only when the status is .notDetermined, and call startRunning() and stopRunning() off the main queue.
import AVFoundation
final class CameraController {
let session = AVCaptureSession()
private let queue = DispatchQueue(label: "camera.session")
private var isConfigured = false
private var observers: [NSObjectProtocol] = []
enum StartResult { case running, denied, failed }
func start() async -> StartResult {
let status = AVCaptureDevice.authorizationStatus(for: .video)
var allowed = (status == .authorized)
if status == .notDetermined {
allowed = await AVCaptureDevice.requestAccess(for: .video)
}
guard allowed else { return .denied }
return await withCheckedContinuation { continuation in
queue.async {
if !self.isConfigured {
guard self.configure() else {
continuation.resume(returning: .failed)
return
}
}
if !self.session.isRunning {
self.session.startRunning()
}
continuation.resume(returning: self.session.isRunning ? .running : .failed)
}
}
}
func stop() {
queue.async {
if self.session.isRunning {
self.session.stopRunning()
}
}
}
private func configure() -> Bool {
session.beginConfiguration()
defer { session.commitConfiguration() }
guard
let device = AVCaptureDevice.default(for: .video),
let input = try? AVCaptureDeviceInput(device: device),
session.canAddInput(input)
else { return false }
session.addInput(input)
// Add your photo or video output here, after checking canAddOutput.
observeInterruptions()
isConfigured = true
return true
}
private func observeInterruptions() {
let center = NotificationCenter.default
observers.append(center.addObserver(
forName: AVCaptureSession.wasInterruptedNotification,
object: session, queue: .main) { note in
let raw = note.userInfo?[AVCaptureSessionInterruptionReasonKey] as? Int
print("Capture interrupted, reason:", raw ?? -1)
// Update UI state here: show "Camera paused", disable the shutter.
})
observers.append(center.addObserver(
forName: AVCaptureSession.interruptionEndedNotification,
object: session, queue: .main) { _ in
print("Capture interruption ended")
// Re-enable the shutter. Don't start a second session.
})
}
}
The important part is the shape. One object owns the session, everything that touches it goes through one queue, and calling start() twice can't create two sessions. The interruption observers update your UI state instead of restarting anything.
This Swift code was written against Apple's documentation. It was later type-checked with Xcode 26.2, as described after Step 4, but it has not been run on a device. Build it in your project and fix anything your Swift version complains about before you rely on it.
Step 3: stop when the screen goes away
The owner is useless if nobody calls stop(). In SwiftUI, tie the session to the camera view and to the scene phase, so it stops when the view disappears and when the app leaves the foreground.
import SwiftUI
struct ScannerScreen: View {
@Environment(\.scenePhase) private var scenePhase
@State private var camera = CameraController()
@State private var message: String?
var body: some View {
CameraPreview(session: camera.session) // your AVCaptureVideoPreviewLayer wrapper
.overlay(alignment: .bottom) {
if let message { Text(message).padding() }
}
.task { await begin() }
.onDisappear { camera.stop() }
.onChange(of: scenePhase) { _, phase in
if phase == .active {
Task { await begin() }
} else {
camera.stop()
}
}
}
private func begin() async {
switch await camera.start() {
case .running: message = nil
case .denied: message = "Camera access is off. You can turn it on in Settings."
case .failed: message = "The camera couldn't start."
}
}
}
Two choices here are deliberate. The camera stops for any phase other than .active, which includes the inactive state when the user pulls down Notification Center. And when access is denied the screen says so in plain words instead of showing a black rectangle. Guideline 5.1.1(iv) asks you to offer an alternative where possible, so if your scanner can also accept a photo from the library or a typed code, show that option on the denied screen.
Step 4: release the microphone
For audio, request permission at the moment the user taps record, keep the session active only while recording, and deactivate it with notifyOthersOnDeactivation when you're done. AVAudioApplication.requestRecordPermission() is available from iOS 17. Apple's documentation notes that without permission the app records only silence, and that an app that touches the microphone without a NSMicrophoneUsageDescription purpose string exits.
import AVFAudio
final class VoiceNoteRecorder {
private var recorder: AVAudioRecorder?
func begin(to url: URL) async throws -> Bool {
guard await AVAudioApplication.requestRecordPermission() else {
return false // show "Microphone is off" with a way to type instead
}
let audio = AVAudioSession.sharedInstance()
try audio.setCategory(.record, mode: .default)
try audio.setActive(true)
let settings: [String: Any] = [
AVFormatIDKey: kAudioFormatMPEG4AAC,
AVSampleRateKey: 44_100,
AVNumberOfChannelsKey: 1
]
let rec = try AVAudioRecorder(url: url, settings: settings)
recorder = rec
return rec.record()
}
func finish() {
recorder?.stop() // stop audio objects first
recorder = nil
do {
try AVAudioSession.sharedInstance()
.setActive(false, options: .notifyOthersOnDeactivation)
} catch {
print("Audio session deactivation failed:", error)
}
}
}
The order in finish() matters. Apple's documentation says deactivating a session while audio objects are still running stops them and returns an isBusy error, so stop the recorder first and deactivate second. Call finish() from every exit: the stop button, the cancel button, the view disappearing and the app moving to the background. As with the camera code, this was not compiled for this post, so build and test it before shipping.
What the compiler and the audit script said on a Mac
The three Swift snippets above were type-checked together with the Swift 6.2.3 compiler in Xcode 26.2, against the iOS Simulator SDK. The post leaves the preview view to you, so a minimal CameraPreview wrapper around AVCaptureVideoPreviewLayer was written for the test. With an iOS 17 deployment target the code compiled in both the Swift 5 and Swift 6 language modes, with warnings and no errors:
- "capture of 'self' with non-Sendable type 'CameraController' in a '@Sendable' closure", once in Swift 5 mode and twice in Swift 6 mode, on the
queue.asyncblocks instart()andstop(). The design is sound, because every touch of the session goes through one serial queue. If you keep that rule, declaringfinal class CameraController: @unchecked Sendabletells the compiler so and removes the warnings. If you can't promise the rule, leave the warnings as a reminder. - With an iOS 16 deployment target,
ScannerScreenfailed with "'onChange(of:initial:_:)' is only available in iOS 17.0 or newer". The two-argumentonChangeclosure needs iOS 17, the same floor asrequestRecordPermission(). For iOS 16, use the single-value form ofonChange.
The audit script was run with the system bash (3.2) and BSD grep against a sample repo whose folder name has a space in it. The repo held the CameraController and VoiceNoteRecorder from this post, a scanner that never stops, a dictation helper that never deactivates, a scanner whose only mention of stopRunning is a comment, a copy of a leaky file under Pods/, an Info.plist with only the camera key, and the microphone key in an INFOPLIST_KEY_ build setting instead.
- It flagged the leaky scanner and the dictation helper, passed both classes from this post, and skipped the file under
Pods/, as intended. - On the first run it also passed the scanner whose only
stopRunningwas in a "TODO: call stopRunning" comment. The script above now ignores whole-line comments when it counts stops, and the second run flagged that file too. - For the microphone key it printed "MISSING" for the Info.plist file and then a "build setting" line. When Xcode merges
INFOPLIST_KEY_settings into the generated Info.plist, the key does reach the built app, so read those two lines together before you add a duplicate. - The interruption check passes the whole repo if any one file observes interruptions. In the sample that file was
CameraController, which says nothing about the leaky scanner. Read it as "someone thought about this", not "every session handles it".
None of this was run on a device, so the indicator behavior itself still needs the checklist below.
Step 5: watch the indicator yourself
The cheapest test is your own eyes on a real device. On supported iPhones the dot is now the most trustworthy signal you have about whether capture is running. Apple's support page About the orange and green indicators explains the meaning: orange means the microphone is in use, green means the camera, or the camera and microphone, is in use. With the Differentiate Without Color setting on, the orange dot becomes an orange square.
Go through this list on a device, with the app built in Release configuration:
- Open the camera feature. The green dot appears.
- Push any screen on top of it, such as settings or a detail view. The dot should go away within a moment.
- Come back. The preview resumes and the dot returns.
- Send the app to the background from the camera screen, then reopen it. No second session, no frozen preview.
- Pull down Notification Center while the camera is open. The session stops, and resumes when you close it.
- Record a voice note, then save it. The orange dot goes away, and music from another app resumes if it was playing.
- Start recording and take a phone call. The UI shows the recording as paused or ended, not still running.
- Deny camera access in Settings, then open the feature. You see a clear message and, where possible, another way to finish the task.
- Delete and reinstall. The first launch shows no camera or microphone prompt until you open the feature that needs it.
For the timing question from earlier, add a temporary log that records when you call startRunning() and when the first sample buffer reaches your output delegate. If any code in your app waits a fixed time before reading frames, replace that wait with "do this when the first frame arrives". Then you don't depend on how long any indicator check takes on any device.
Step 6: write purpose strings a reviewer can check
Generated purpose strings are often generic, such as "This app needs camera access." Guideline 5.1.1(ii) asks for strings that clearly and completely describe how you use the data. Name the feature and say what happens to the result. How to Fix App Store Rejection 4.3 (Spam) When AI Tools Built Your App covers other generated text that reviewers notice.
- Weak: "We need your camera."
- Better: "The camera scans the barcode on a product so you can add it to your list. Photos are not saved or uploaded."
- Weak: "Microphone access is required."
- Better: "The microphone records voice notes you choose to save. Recording starts only when you tap the red button."
Only write "not saved or uploaded" if it is true. If the image goes to a server for processing, say that instead, and make sure your privacy policy and App Store privacy details say the same thing. A reviewer who sees the app upload frames after reading "photos are not uploaded" has an easy reason to reject.
Step 7: tell App Review what to expect
If the camera or microphone sits behind sign-in or a paywall, the reviewer can only check your indicator behavior if they can reach it. Put the path in the App Review notes: which account to use, which tab, which button starts capture and what the user sees when they stop. If you use the microphone for an AI feature that sends audio to a model provider, say that too. A short note that matches what the reviewer sees on the device is better than a long one they have to puzzle out.
Where this leaves you
Apple's November 12 post is mostly about Apple's own ambient features, and it makes no promise about third-party apps beyond the indicator itself. For your app the practical result is narrow: on the newest iPhones the camera and microphone indicators are enforced in an isolated part of the chip that your code has no way to touch. The fix is the same capture hygiene Apple has documented for years, done properly. Give the session one owner, start it off the main thread, stop it on every exit, deactivate audio when you finish, handle interruptions and ask for permission when the feature opens.
If you use Claude Code on your iOS project, Claude Code + Xcode: The Production iOS Workflow Kit ($18) is a set of AGENTS.md and CLAUDE.md templates, rules (one of them covers privacy and security), commands and specialized iOS agents, plus a runnable sample app and runbooks. It does not include camera or microphone code and it won't check your indicator behavior for you. It gives your coding agent written rules to follow, so code like the examples above is less likely to come back broken the next time it edits a capture screen.
FAQ
Do I need to change my code because of Secure Exclaves?
No new API or rule came with the post. You need to change your code only if it already misuses the camera or microphone, for example by never stopping a session. The exclave design makes that misuse visible in a way your app can't suppress.
Which devices use Secure Exclaves for the indicator?
Apple names iPhone 18 Pro, iPhone 18 Pro Max and iPhone Duo for the camera and microphone indicators, and MacBook Neo and HomeView for camera indicators. The post does not list OS versions or say anything about older devices.
Can an app hide or delay the green or orange dot?
Apple says data only flows after the indicator is on and has been visible for a sufficient amount of time, and that apps must go through access management in exclaveOS. Apple doesn't document any way for an app to affect the indicator, and you should not try.
Will App Review reject an app that leaves the camera running?
Apple doesn't publish a rule about session lifetime. Guideline 2.5.14 does require consent and a clear indication when recording, and 5.1.1 covers permission requests and purpose strings. An app that keeps capturing on screens with no visible camera use invites questions under those guidelines, and it invites bad reviews from users either way.
Should I test this in the Simulator?
Use a real device for indicator checks. The checklist above assumes a physical iPhone, ideally one of the models Apple names, plus an older one to compare.
Keep reading on JR Devhub
- Apple's Retention Messages Are Live: What Opened, What Didn't, and How to Set Yours Up
- Siri AI App Skills: What iOS Developers Should Build Before Spring
- Apple Says 100,000 Apps Are Built for iPhone Duo. How to Get Your AI-Built App Ready and Earn the Badge
- The Touchscreen MacBook Pro Is Here: What to Fix in Your Mac App First
Sources
- Apple Security Research: Secure Exclaves and Ambient Sensing (November 12, 2026)
- Apple App Review Guidelines (2.5.14, 5.1.1)
- Apple: Requesting authorization to capture and save media
- Apple: AVCaptureSession
- Apple: wasInterruptedNotification
- Apple: AVAudioSession setActive(_:options:)
- Apple: AVAudioApplication requestRecordPermission
- Apple Support: About the orange and green indicators in your iPhone status bar

Comments