diff --git a/APNGKit.podspec b/APNGKit.podspec index 5ae1eeb..3543254 100644 --- a/APNGKit.podspec +++ b/APNGKit.podspec @@ -21,6 +21,7 @@ Pod::Spec.new do |s| s.ios.deployment_target = "12.0" s.osx.deployment_target = "10.14" s.tvos.deployment_target = "12.0" + s.visionos.deployment_target = "1.0" s.source = { :git => "https://github.com/onevcat/APNGKit.git", :tag => s.version } diff --git a/Package@swift-5.9.swift b/Package@swift-5.9.swift index 80c6b90..98f8bc2 100644 --- a/Package@swift-5.9.swift +++ b/Package@swift-5.9.swift @@ -3,7 +3,7 @@ import PackageDescription let package = Package( name: "APNGKit", - platforms: [.macOS(.v10_14), .iOS(.v12), .tvOS(.v12)], + platforms: [.macOS(.v10_14), .iOS(.v12), .tvOS(.v12), .visionOS(.v1)], products: [ .library(name: "APNGKit", targets: ["APNGKit"]) ], diff --git a/Tests/APNGKitTests/APNGImageViewTests.swift b/Tests/APNGKitTests/APNGImageViewTests.swift index cc65ae3..f47c299 100644 --- a/Tests/APNGKitTests/APNGImageViewTests.swift +++ b/Tests/APNGKitTests/APNGImageViewTests.swift @@ -23,8 +23,11 @@ class ViewControllerStub { func setupViewController(_ input: UIViewController) -> UIViewController { input.loadViewIfNeeded() - + #if os(visionOS) + window = UIWindow(frame: .init(x: 0, y: 0, width: 800, height: 600)) + #else window = UIWindow(frame: UIScreen.main.bounds) + #endif window.rootViewController = input window.makeKeyAndVisible() return input