Skip to content

Comments

Add iOS 16+ version check for MultitaskingCameraAccess API#290

Merged
jfversluis merged 2 commits intomainfrom
copilot/add-needed-check-for-issue-288
Jan 13, 2026
Merged

Add iOS 16+ version check for MultitaskingCameraAccess API#290
jfversluis merged 2 commits intomainfrom
copilot/add-needed-check-for-issue-288

Conversation

Copy link
Contributor

Copilot AI commented Jan 9, 2026

The MultitaskingCameraAccessSupported and MultitaskingCameraAccessEnabled properties are only available on iOS 16+. Accessing them on iOS 15 causes runtime crashes.

Changes

  • Wrapped MultitaskingCameraAccess API calls with OperatingSystem.IsIOSVersionAtLeast(16) guard in CameraManager.ios.maccatalyst.cs
#if IOS
if (OperatingSystem.IsIOSVersionAtLeast(16))
{
    if (captureSession.MultitaskingCameraAccessSupported)
    {
        captureSession.BeginConfiguration();
        captureSession.MultitaskingCameraAccessEnabled = true;
        captureSession.CommitConfiguration();
    }
}
#endif

This preserves the iPadOS Windowed Apps mode fix for iOS 16+ while maintaining compatibility with iOS 15 devices.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • https://api.github.com/repos/Redth/ZXing.Net.Maui/issues/288/comments
    • Triggering command: /usr/bin/curl curl -s REDACTED (http block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Can you have a look at this comment and add the needed check #288 (comment)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Co-authored-by: jfversluis <939291+jfversluis@users.noreply.github.com>
Copilot AI changed the title [WIP] Add needed check for issue 288 Add iOS 16+ version check for MultitaskingCameraAccess API Jan 9, 2026
Copilot AI requested a review from jfversluis January 9, 2026 10:15
@jfversluis jfversluis marked this pull request as ready for review January 9, 2026 10:39
@jfversluis jfversluis requested a review from Copilot January 9, 2026 10:39
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds an iOS version check to prevent runtime crashes on iOS 15 devices when accessing the MultitaskingCameraAccess API, which is only available on iOS 16+.

Key Changes:

  • Wrapped MultitaskingCameraAccess API calls with OperatingSystem.IsIOSVersionAtLeast(16) guard to ensure compatibility with iOS 15 devices while preserving iPadOS Windowed Apps mode functionality for iOS 16+.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@jfversluis jfversluis merged commit 3883a7b into main Jan 13, 2026
10 checks passed
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.

2 participants