Skip to content

Commit

Permalink
Explicitly support visionOS
Browse files Browse the repository at this point in the history
  • Loading branch information
onevcat committed Mar 18, 2024
1 parent 60f83ac commit 0d7e8d4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions APNGKit.podspec
Expand Up @@ -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 }

Expand Down
2 changes: 1 addition & 1 deletion Package@swift-5.9.swift
Expand Up @@ -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"])
],
Expand Down
5 changes: 4 additions & 1 deletion Tests/APNGKitTests/APNGImageViewTests.swift
Expand Up @@ -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
Expand Down

0 comments on commit 0d7e8d4

Please sign in to comment.