Skip to content

Conversation

@msageryd
Copy link

@msageryd msageryd commented Jan 15, 2026

Summary

Adds support for iPad Split View / Slide Over multitasking:

  • Enable isMultitaskingCameraAccessEnabled on iOS 16+ devices that support it
  • Add session interruption observers for AVCaptureSessionWasInterrupted
  • Report session/multitasking-camera-not-supported error to JS when camera is interrupted due to videoDeviceNotAvailableWithMultipleForegroundApps
  • Auto-restart camera when interruption ends (user closes other apps)

Problem

On iPad, when the app is in Split View or Slide Over with another app, the camera shows a black screen. There's no feedback to the user about why the camera isn't working.

Solution

  1. For M-series iPads (M1, M2, M3, etc.): Enable isMultitaskingCameraAccessEnabled so the camera works in split view
  2. For older iPads: Send a proper error (session/multitasking-camera-not-supported) to the JS side so apps can show a user-friendly message explaining the limitation

Changes

  • CameraSession.swift: Added interruption observers and multitasking enable logic
  • CameraError.swift: Added new SessionError.multitaskingCameraNotSupported case

Usage

Apps can handle the error in onError:

<Camera
  onError={(error) => {
    if (error.code === 'session/multitasking-camera-not-supported') {
      // Show message: "Camera cannot run in split view on this iPad"
    }
  }}
/>

Testing

Tested on:

  • iPad Air 7th gen with M3 chip (iOS 18.6.2) - camera works in Split View
  • iPad Air 7th gen with M3 chip (iOS 26.2) - camera works in Split View and Slide Over view
  • iPad Pro 3rd gen with A12X chip (iOS 26.2) - receives session/multitasking-camera-not-supported error in Split View, camera auto-restarts when returning to full screen

- Enable isMultitaskingCameraAccessEnabled on iOS 16+ devices that
  support it
- Add session interruption observers for AVCaptureSessionWasInterrupted
- Report session/multitasking-camera-not-supported error to JS when
  camera is interrupted due to
  videoDeviceNotAvailableWithMultipleForegroundApps
- Auto-restart camera when interruption ends

This allows the camera to work in iPad Split View / Slide Over mode on
supported devices (M1+ iPads), and provides a proper error callback for
unsupported devices so apps can show user-friendly messages.
@vercel
Copy link

vercel bot commented Jan 15, 2026

@msageryd is attempting to deploy a commit to the mrousavy's Team Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant