Two kinds of Picture-in-Picture
In both cases you still call
enablePictureInPictureLayout() / disablePictureInPictureLayout()
so the SDK reshapes the call UI to match.
System PiP is implemented inside the Calls SDK, not only in Apple’s API: the 5.0.4 binary links
AVKit and carries the whole path (AVPictureInPictureController,
AVPictureInPictureControllerContentSource, AVPictureInPictureVideoCallViewController), gated
behind SessionSettingsBuilder.enableIOSPictureInPicture(_:). Enable that flag and add the
Background Modes → Audio, AirPlay, and Picture in Picture capability. You can still host
AVPictureInPictureController yourself if you want full control over the window.In-app PiP with PiPViewCoordinator
PiPViewCoordinator ships with the Calls SDK. Give it the same UIView you passed to
joinSession(container:) and it turns that view into a draggable, tappable mini-call.
- Swift
PiPViewCoordinator reference
The tile size is fixed at 150px. The
c property that used to set it is deprecated and ignored.How the SDK layout hook works
- Something provides the small window —
PiPViewCoordinator(in-app) orAVPictureInPictureController(system) - You notify the Calls SDK by calling
enablePictureInPictureLayout() - The SDK adjusts the call UI to fit the smaller window (hides controls, optimizes layout)
- When exiting, call
disablePictureInPictureLayout()to restore the full UI
Enable Picture-in-Picture
Enter PiP mode programmatically using theenablePictureInPictureLayout() action:
- Swift
- Objective-C
Disable Picture-in-Picture
Exit PiP mode and return to the full-screen call interface:- Swift
- Objective-C
Listen for PiP Events
Monitor PiP mode transitions usingLayoutListener to update your UI accordingly:
- Swift
- Objective-C
System PiP setup (floating over other apps)
Only needed for System PiP — In-app PiP viaPiPViewCoordinator requires none of this.
1. Enable Background Modes
In your project’s Signing & Capabilities, add the Background Modes capability and enable:
- Audio, AirPlay, and Picture in Picture
- Swift
- Objective-C
PiP mode is available on iOS 14.0 and later for iPhones, and iOS 9.0 and later for iPads.