Skip to content

1.0.5

Latest

Choose a tag to compare

@coenttb coenttb released this 31 Mar 16:24

visionOS Support

Adds visionOS as a supported platform. Closes #27.

Changes

  • Added os(visionOS) to platform guards for Metrics DependencyKey, test dependency key, and WKWebView configuration
  • Added .visionOS(.v1) to the platforms array in Package.swift
  • Added visionOS CI job (debug build + test on visionOS Simulator)

Details

All existing UIKit printing APIs (UIPrintPageRenderer, UIMarkupTextPrintFormatter, UIGraphicsBeginPDFContextToData, viewPrintFormatter()) are available on visionOS — the iOS code path works as-is. No separate visionOS implementation was needed.

The root cause was that PDF.Render.Metrics's DependencyKey conformance was guarded by #if os(macOS) || os(iOS), which excludes visionOS. On visionOS canImport(UIKit) is true (so the iOS implementation compiled) but os(iOS) is false (so the metrics conformance was missing).