Skip to content

feat: add visionOS support#3

Merged
patro85 merged 1 commit into
masterfrom
feat/visionos-support
Jun 1, 2026
Merged

feat: add visionOS support#3
patro85 merged 1 commit into
masterfrom
feat/visionos-support

Conversation

@patro85

@patro85 patro85 commented Jun 1, 2026

Copy link
Copy Markdown
Owner

What

  • Declares .visionOS(.v1) as a supported platform in Package.swift (requires bumping swift-tools-version from 5.3 → 5.9, the minimum that knows about the visionOS platform).
  • Adds a #if os(visionOS) branch to the screen bounds computation, using the active UIWindowScene's coordinate space (visionOS has no UIScreen.main).

Why

visionOS support was requested in elai950#86 and attempted in two stale upstream PRs. This combines the complete fix.

Credit / supersedes

Combines @derwaldgeist's elai950#104 (Package + screen) and @lhuanyu's elai950#87 (screen only). elai950#87 alone was insufficient because it never declared the platform.

Verification

swift build passes on macOS host (swift-tools 5.9 parses cleanly).

🤖 Generated with Claude Code

Declare `.visionOS(.v1)` in Package.swift (bumping swift-tools-version to
5.9, the minimum that supports the visionOS platform) and resolve the
on-screen positioning by deriving bounds from the active UIWindowScene's
coordinate space under `#if os(visionOS)`.

Supersedes elai950#104 and elai950#87 (the latter only added the
screen branch without the Package.swift platform declaration).

Resolves elai950#86.

Co-Authored-By: derwaldgeist <derwaldgeist@users.noreply.github.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@patro85 patro85 merged commit a7a777e into master Jun 1, 2026
@patro85 patro85 deleted the feat/visionos-support branch June 1, 2026 17:34
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