Scene accessories let an app show content on both displays at once. The camera capture accessory is new for iPhone Duo, and pairs additional UI on the outer display with your main UI on the inner one.
Availability is conditional
The camera capture accessory is available only when your app is full screen on the inner display and an active camera session exists. It is enabled by default and the system can toggle it at any time, so you must observe availability changes:
struct CameraRootView: View {
@State private var model = TeleprompterModel()
var body: some View {
CameraView(model: model)
.sceneAccessory {
CameraCaptureAccessory(isEnabled: $model.isEnabled) {
TeleprompterView(model: model)
}
.onAvailabilityChange { newValue in
model.isAvailable = newValue
}
}
.toolbar {
TeleprompterToggle(isEnabled: $model.isEnabled)
.disabled(!model.isAvailable)
}
}
}
Note how the toolbar toggle is disabled from observed availability rather than assumed. Availability changes when the device state changes — folding the device is enough — so a control that assumes availability will fail in the user’s hand.
Where it earns its place
The strongest cases give the two displays genuinely different audiences: a teleprompter facing the person being filmed, a preview facing the subject of a portrait, a game controller facing the player while the board faces the table.
If the outer display would only mirror the inner one, leave it alone. An accessory that duplicates content costs power and attention for nothing.
How to verify
Enable the accessory, then fold the device, background the app, and end the camera session. Each transition should disable the control gracefully, with no stale UI left on the outer display.