diff --git a/Example/Project.swift b/Example/Project.swift index 6d14e7c..81392ab 100644 --- a/Example/Project.swift +++ b/Example/Project.swift @@ -8,10 +8,10 @@ let project = Project( targets: [ .target( name: "Example", - destinations: [.iPhone, .iPad, .mac], + destinations: [.iPhone, .iPad, .mac, .appleVision], product: .app, bundleId: "org.OpenSwiftUIProject.OpenSwiftUI-spm.Example", - deploymentTargets: .multiplatform(iOS: "18.0", macOS: "15.0"), + deploymentTargets: .multiplatform(iOS: "18.0", macOS: "15.0", visionOS: "2.0"), infoPlist: .extendingDefault(with: [ "UILaunchScreen": [ "UIColorName": "", diff --git a/Example/README.md b/Example/README.md index 54c886c..e8ae98e 100644 --- a/Example/README.md +++ b/Example/README.md @@ -1,6 +1,6 @@ # Example -A minimal iOS and macOS app demonstrating OpenSwiftUI binary framework +A minimal iOS, macOS, and visionOS app demonstrating OpenSwiftUI binary framework integration through an Xcode-native Swift package dependency. Tuist only generates the Example project and workspace. @@ -38,6 +38,13 @@ export OPENSWIFTUI_LOCAL_XCFRAMEWORKS_PATH=/path/to/OpenSwiftUI/build "$(dirname "$(xcode-select -p)")/MacOS/Xcode" "$PWD/Example.xcworkspace" ``` +## visionOS + +The visionOS target requires visionOS 2.0 or later and XCFrameworks with visionOS +device and simulator slices. The 0.23.1 binaries do not include these slices. +Until a release includes them, use `OPENSWIFTUI_LOCAL_XCFRAMEWORKS_PATH` with +locally built XCFrameworks. + ## Notes - The generated `.xcodeproj` and `.xcworkspace` are gitignored — always regenerate via `tuist generate`. diff --git a/Package.resolved b/Package.resolved index 5d380e4..d51ade6 100644 --- a/Package.resolved +++ b/Package.resolved @@ -1,5 +1,5 @@ { - "originHash" : "6c4892db87d745b10e47437c91409387a9a726b07054e3232191ee3b7518c8e7", + "originHash" : "f9ad721a51ef07269cee0c6a59c108bf2364da7d58e471cf937e3c442da4e242", "pins" : [ { "identity" : "swift-syntax", diff --git a/Package.swift b/Package.swift index 205ebee..93c4172 100644 --- a/Package.swift +++ b/Package.swift @@ -110,8 +110,8 @@ let package = Package( * as we can't conditional change platforms for trait. So keep leave this for now. * And the final MachO target must match the OS version to successfully link the framework. */ - // platforms: [.iOS(.v18), .macOS(.v15)], - platforms: [.iOS(.v15), .macOS(.v12)], + // platforms: [.iOS(.v18), .macOS(.v15), .visionOS(.v2)], + platforms: [.iOS(.v15), .macOS(.v12), .visionOS(.v1)], products: [ .library( name: "OpenSwiftUI", diff --git a/Package.swift.template b/Package.swift.template index 3ec2c6d..b8c94f6 100644 --- a/Package.swift.template +++ b/Package.swift.template @@ -110,8 +110,8 @@ let package = Package( * as we can't conditional change platforms for trait. So keep leave this for now. * And the final MachO target must match the OS version to successfully link the framework. */ - // platforms: [.iOS(.v18), .macOS(.v15)], - platforms: [.iOS(.v15), .macOS(.v12)], + // platforms: [.iOS(.v18), .macOS(.v15), .visionOS(.v2)], + platforms: [.iOS(.v15), .macOS(.v12), .visionOS(.v1)], products: [ .library( name: "OpenSwiftUI", diff --git a/README.md b/README.md index c3a803b..cc9b293 100644 --- a/README.md +++ b/README.md @@ -60,8 +60,9 @@ Examples of SwiftUI packages using this integration pattern: ## Platform Support Currently supports: -- iOS 18.0+ (device and simulator) +- iOS 18.0+ - macOS 15.0+ +- visionOS 2.0+ ## Macro Distribution