Skip to content

Commit

Permalink
feat: Add vision support
Browse files Browse the repository at this point in the history
  • Loading branch information
sigsbeym committed Jun 5, 2024
1 parent baf4eb8 commit 3a1bfb5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
24 changes: 14 additions & 10 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,31 +1,34 @@
// swift-tools-version:5.3
// swift-tools-version:5.9
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
name: "PINRemoteImage",
platforms: [
.macOS(.v10_10),
.iOS(.v9),
.tvOS(.v9)
.macOS(.v10_13),
.iOS(.v12),
.tvOS(.v12),
.visionOS(.v1)
],
products: [
.library(
name: "PINRemoteImage",
type: .static,
targets: ["PINRemoteImage"]),
targets: ["PINRemoteImage"]
),
],
dependencies: [
.package(url: "https://github.com/pinterest/PINCache.git", from: "3.0.3"),
.package(name: "libwebp",
url: "https://github.com/SDWebImage/libwebp-Xcode",
from: "1.1.0"),
.package(url: "https://github.com/SDWebImage/libwebp-Xcode", from: "1.1.0"),
],
targets: [
.target(
name: "PINRemoteImage",
dependencies: ["PINCache", "libwebp"],
dependencies: [
"PINCache",
.product(name: "libwebp", package: "libwebp-Xcode")
],
path: "Source/Classes",
publicHeadersPath: "include",
cSettings: [
Expand All @@ -38,6 +41,7 @@ let package = Package(
.define("NS_BLOCK_ASSERTIONS", to: "1", .when(configuration: .release)),
.define("USE_PINCACHE", to: "1"),
.define("PIN_WEBP", to: "1"),
]),
]
),
]
)
2 changes: 1 addition & 1 deletion Source/Classes/AnimatedImages/PINAnimatedImage.m
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ + (NSInteger)maximumFramesPerSecond
static NSInteger maximumFramesPerSecond = 60;

dispatch_once(&onceToken, ^{
#if PIN_TARGET_IOS
#if PIN_TARGET_IOS && !TARGET_OS_VISION
if (@available(iOS 10.3, tvOS 10.3, *)) {
maximumFramesPerSecond = 0;
for (UIScreen *screen in [UIScreen screens]) {
Expand Down

0 comments on commit 3a1bfb5

Please sign in to comment.