visionOS Support
Adds visionOS as a supported platform. Closes #27.
Changes
- Added
os(visionOS)to platform guards for MetricsDependencyKey, test dependency key, and WKWebView configuration - Added
.visionOS(.v1)to theplatformsarray 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).