The package now builds — and can make purchases — on visionOS, and CI builds every platform it declares. Nothing breaks on any platform that compiled before.
Added
purchase(productID:confirmIn:) on visionOS, on both PurchasesProtocol and PurchasesManager:
let result = try await PurchasesManager.shared.purchase(productID: "pro.monthly", confirmIn: scene)StoreKit has no scene-less purchase on visionOS — a spatial app can show several windows, so the system has to be told which one owns the confirmation sheet. The scene-less purchase(productID:) is therefore compiled out on visionOS rather than left to fail at runtime. Because the new method is a protocol requirement, a stand-in implementation can represent purchases on visionOS too. In SwiftUI, StoreKit's PurchaseAction resolves the scene for you.
iOS, macOS, Mac Catalyst, watchOS and tvOS keep exactly the API they had.
Fixed
- The package never compiled for visionOS, despite declaring it:
purchase(productID:)calledProduct.purchase(options:), which does not exist there. CI only built for the host, so it stayed green. CI now builds iOS, Mac Catalyst, watchOS, tvOS and visionOS on every run. - DocC reported ten warnings under Xcode 27 — descriptions inside topic groups that never rendered, a misplaced
@DisplayName, and a symbol link to a type outside the module. A clean documentation build is now warning-free. - The documentation root advertised the pre-2.0 minimums (iOS 15, macOS 12, visionOS 1.0). It now shows 26 for every platform, matching
Package.swift.
Verified
On Xcode 27 / Swift 6.4 locally, and in CI on Xcode 26.6: the library builds for all six platforms with no warnings, visionOS also with the Swift 7 upcoming features and warnings as errors, the test target builds for the visionOS simulator, and all 30 tests pass.