Quick Answer
Keep the camera path you already use unless the product needs a capability that differs between iPhone Duo's two physical front cameras. A normal front-camera discovery session returns the Virtual Front Camera on Duo, and the system follows the app between the outer and inner displays. If capture is the product and you need the full resolution, frame-rate, or depth capabilities of a physical camera, discover those cameras directly and use AVCaptureDeviceDirectionCoordinator to determine which one faces the same direction as the preview.
Do not infer camera direction from .front or .back. On Duo, a camera's physical position stays constant while the display facing the user can change.
Requirements
Xcode 27.1 and the iOS 27.1 SDK for Duo-specific camera APIs.
A real
AVCaptureSessionarchitecture that keeps session mutation off the main actor.A
UIViewassociated with the preview. The direction coordinator uses this view as its frame of reference.Camera permission copy and a usable denied-permission state.
Choose the Smallest Camera Strategy That Meets the Product Need
There are two legitimate paths:
| Strategy | Use it when | Tradeoff | |---|---|---| | Virtual Front Camera | Video calls, profile photos, document capture, or an existing front-camera flow | The system switches displays for you, but exposes only capabilities common to both front cameras | | Physical cameras plus direction coordinator | Camera creation is a primary feature and the app needs higher resolution, higher frame rate, depth, or deliberate rear-camera selfies | Your app owns camera selection, session reconfiguration, mirroring, and transition behavior |
Apple states that the inner front camera supports up to 1080p at 60 fps, while the outer front camera supports up to 4K at 120 fps. The virtual device therefore tops out at the shared 1080p/60-fps capability, and depth requires direct access to a physical camera. Treat those limits as a product decision before adding coordination code.
read the rest : https://3nsofts.com/guides/ios-layout/iphone-duo-camera-avfoundation