Skip to content

fix(ios): add @available(iOS 13.0, *) to UIApplication extension#3694

Closed
msageryd wants to merge 1 commit intomrousavy:mainfrom
msageryd:fix/ios13-availability-annotation
Closed

fix(ios): add @available(iOS 13.0, *) to UIApplication extension#3694
msageryd wants to merge 1 commit intomrousavy:mainfrom
msageryd:fix/ios13-availability-annotation

Conversation

@msageryd
Copy link
Copy Markdown

UIWindowScene and connectedScenes APIs require iOS 13+, but the extension was missing the availability annotation, causing build errors when deployment target is below iOS 13.

Summary

Adds missing @available(iOS 13.0, *) annotation to UIApplication+interfaceOrientation.swift.

Problem

The extension uses UIWindowScene and connectedScenes APIs which require iOS 13+, but the extension is missing the availability annotation. This causes build errors:

'UIWindowScene' is only available in iOS 13.0 or newer

While the VisionCamera podspec declares iOS 12.4 as minimum, this file uses iOS 13+ APIs without proper guards. When CocoaPods compiles the pod, it uses the pod's declared minimum (12.4), not the app's deployment target, causing the build to fail.

Why this matters

Users may be running older Xcode versions (e.g., 16.x) because they're not yet ready to migrate to React Native's new architecture and need to stay on older RN versions. These setups are more likely to surface this build error.

Alternative solution

Instead of adding @available, the podspec minimum could be bumped to iOS 13.0. However, adding the annotation is more conservative and maintains backwards compatibility for any iOS
12 users.

Changes

  • UIApplication+interfaceOrientation.swift: Added @available(iOS 13.0, *) to the extension

Related issues

#3648, #3404, #3040

UIWindowScene and connectedScenes APIs require iOS 13+, but the
extension was missing the availability annotation, causing build
errors when deployment target is below iOS 13.
@vercel
Copy link
Copy Markdown

vercel Bot commented Jan 13, 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.

@mrousavy
Copy link
Copy Markdown
Owner

Hey - thanks for your PR, I really appreciate it! And sorry for not replying sooner, I was hyper-focused on VisionCamera V5.

I believe this is now obsolete, as VisionCamera V5 "fixed" this, I'm closing this PR (as it's out of sync with main since I rewrote the entire codebase), but please let me know if this still needs attention in V5 and we can open a new issue for discussion, or possibly a PR already with a fix.

@mrousavy mrousavy closed this Apr 21, 2026
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