From e3391ffc53bcd9076797868512fb360e766a4298 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20=C5=9Aredzi=C5=84ski?= Date: Tue, 25 Jun 2024 14:37:03 +0200 Subject: [PATCH 1/9] Allow UIView subviews to be a part of Accessibility Tree --- Source/Details/_ASDisplayViewAccessiblity.mm | 35 ++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/Source/Details/_ASDisplayViewAccessiblity.mm b/Source/Details/_ASDisplayViewAccessiblity.mm index 23b1f89db..d100982ed 100644 --- a/Source/Details/_ASDisplayViewAccessiblity.mm +++ b/Source/Details/_ASDisplayViewAccessiblity.mm @@ -220,6 +220,11 @@ static BOOL nodeIsHiddenFromAcessibility(ASDisplayNode *node) { return node.isHidden || node.alpha == 0.0 || node.accessibilityElementsHidden; } +/// returns YES if this view should be considered "hidden" from the screen reader. +static BOOL viewIsHiddenFromAcessibility(UIView *view) { + return view.isHidden || view.alpha == 0.0 || view.accessibilityElementsHidden; +} + /// Collect all accessibliity elements for a given view and view node static void CollectAccessibilityElements(ASDisplayNode *node, NSMutableArray *elements) { @@ -302,6 +307,36 @@ static void CollectAccessibilityElements(ASDisplayNode *node, NSMutableArray *el [elements addObject:subnode.view]; } } + + if (modalSubnode) { + return; + } + + NSArray *subviews = view.subviews; + for (UIView *subview in subviews) { + // If a view is is already added then skip it + if ([elements containsObject:subview]) { + continue; + } + + // If a view is hidden or has an alpha of 0.0 we should not include it + if (viewIsHiddenFromAcessibility(subview)) { + continue; + } + + // If a subview is outside of the view's window, exclude it UNLESS it is a subview of an UIScrollView. + // In this case UIKit will return the element even if it is outside of the window or the scrollView's visible rect (contentOffset + contentSize) + CGRect viewInWindowCoords = [node convertRect:subview.frame toNode:nil]; + if (!CGRectIntersectsRect(view.window.frame, viewInWindowCoords) && !recusivelyCheckSuperviewsForScrollView(view)) { + continue; + } + + if (subview.isAccessibilityElement) { + [elements addObject:subview]; + } else if (subview.accessibilityElementCount > 0) { + [elements addObject:subview]; + } + } } @implementation _ASDisplayView (UIAccessibilityContainer) From 3666ff025634209fad5afb65878c2561ee397ad7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20=C5=9Aredzi=C5=84ski?= Date: Thu, 5 Dec 2024 15:27:44 +0100 Subject: [PATCH 2/9] Create Package.swift --- Package.swift | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 112 insertions(+) create mode 100644 Package.swift diff --git a/Package.swift b/Package.swift new file mode 100644 index 000000000..94ead892c --- /dev/null +++ b/Package.swift @@ -0,0 +1,112 @@ +// swift-tools-version: 5.7 +import PackageDescription + +let package = Package( + name: "Texture", + platforms: [ + .iOS(.v14), + .tvOS(.v14) + ], + products: [ + .library(name: "Texture", targets: ["Texture"]), + .library(name: "PINRemoteImage", targets: ["PINRemoteImage"]), + .library(name: "IGListKit", targets: ["IGListKit"]), + .library(name: "Yoga", targets: ["Yoga"]), + .library(name: "TextNode2", targets: ["TextNode2"]), + .library(name: "Video", targets: ["Video"]), + .library(name: "MapKit", targets: ["MapKit"]), + .library(name: "Photos", targets: ["Photos"]), + .library(name: "AssetsLibrary", targets: ["AssetsLibrary"]) + ], + dependencies: [ + .package(url: "https://github.com/pinterest/PINRemoteImage.git", from: "3.0.0"), + .package(url: "https://github.com/Instagram/IGListKit.git", from: "4.0.0"), + .package(url: "https://github.com/facebook/yoga.git", from: "2.0.0") + ], + targets: [ + .target( + name: "Texture", + path: "Source", + publicHeadersPath: "./", + cxxSettings: [ + .define("CLANG_CXX_LANGUAGE_STANDARD", to: "c++11"), + .define("CLANG_CXX_LIBRARY", to: "libc++") + ] + ), + .target( + name: "PINRemoteImage", + dependencies: [ + "Texture", + .product(name: "PINRemoteImage", package: "PINRemoteImage"), + .product(name: "PINCache", package: "PINRemoteImage") + ] + ), + .target( + name: "IGListKit", + dependencies: [ + "Texture", + .product(name: "IGListKit", package: "IGListKit"), + .product(name: "IGListDiffKit", package: "IGListKit") + ] + ), + .target( + name: "Yoga", + dependencies: [ + "Texture", + .product(name: "Yoga", package: "yoga") + ], + cSettings: [ + .define("YOGA", to: "1") + ] + ), + .target( + name: "TextNode2", + dependencies: ["Texture"], + cSettings: [ + .define("AS_ENABLE_TEXTNODE", to: "0") + ] + ), + .target( + name: "Video", + dependencies: ["Texture"], + cSettings: [ + .define("AS_USE_VIDEO", to: "1") + ], + linkerSettings: [ + .linkedFramework("AVFoundation"), + .linkedFramework("CoreMedia") + ] + ), + .target( + name: "MapKit", + dependencies: ["Texture"], + cSettings: [ + .define("AS_USE_MAPKIT", to: "1") + ], + linkerSettings: [ + .linkedFramework("CoreLocation"), + .linkedFramework("MapKit") + ] + ), + .target( + name: "Photos", + dependencies: ["Texture"], + cSettings: [ + .define("AS_USE_PHOTOS", to: "1") + ], + linkerSettings: [ + .linkedFramework("Photos") + ] + ), + .target( + name: "AssetsLibrary", + dependencies: ["Texture"], + cSettings: [ + .define("AS_USE_ASSETS_LIBRARY", to: "1") + ], + linkerSettings: [ + .linkedFramework("AssetsLibrary") + ] + ) + ] +) From b90a2e9f1a7edc078c5433c2ed1e2c76d78f5f73 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20=C5=9Aredzi=C5=84ski?= Date: Thu, 5 Dec 2024 15:31:10 +0100 Subject: [PATCH 3/9] Update Package.swift --- Package.swift | 85 +-------------------------------------------------- 1 file changed, 1 insertion(+), 84 deletions(-) diff --git a/Package.swift b/Package.swift index 94ead892c..94dde3c0d 100644 --- a/Package.swift +++ b/Package.swift @@ -9,15 +9,7 @@ let package = Package( ], products: [ .library(name: "Texture", targets: ["Texture"]), - .library(name: "PINRemoteImage", targets: ["PINRemoteImage"]), - .library(name: "IGListKit", targets: ["IGListKit"]), - .library(name: "Yoga", targets: ["Yoga"]), - .library(name: "TextNode2", targets: ["TextNode2"]), - .library(name: "Video", targets: ["Video"]), - .library(name: "MapKit", targets: ["MapKit"]), - .library(name: "Photos", targets: ["Photos"]), - .library(name: "AssetsLibrary", targets: ["AssetsLibrary"]) - ], + dependencies: [ .package(url: "https://github.com/pinterest/PINRemoteImage.git", from: "3.0.0"), .package(url: "https://github.com/Instagram/IGListKit.git", from: "4.0.0"), @@ -32,81 +24,6 @@ let package = Package( .define("CLANG_CXX_LANGUAGE_STANDARD", to: "c++11"), .define("CLANG_CXX_LIBRARY", to: "libc++") ] - ), - .target( - name: "PINRemoteImage", - dependencies: [ - "Texture", - .product(name: "PINRemoteImage", package: "PINRemoteImage"), - .product(name: "PINCache", package: "PINRemoteImage") - ] - ), - .target( - name: "IGListKit", - dependencies: [ - "Texture", - .product(name: "IGListKit", package: "IGListKit"), - .product(name: "IGListDiffKit", package: "IGListKit") - ] - ), - .target( - name: "Yoga", - dependencies: [ - "Texture", - .product(name: "Yoga", package: "yoga") - ], - cSettings: [ - .define("YOGA", to: "1") - ] - ), - .target( - name: "TextNode2", - dependencies: ["Texture"], - cSettings: [ - .define("AS_ENABLE_TEXTNODE", to: "0") - ] - ), - .target( - name: "Video", - dependencies: ["Texture"], - cSettings: [ - .define("AS_USE_VIDEO", to: "1") - ], - linkerSettings: [ - .linkedFramework("AVFoundation"), - .linkedFramework("CoreMedia") - ] - ), - .target( - name: "MapKit", - dependencies: ["Texture"], - cSettings: [ - .define("AS_USE_MAPKIT", to: "1") - ], - linkerSettings: [ - .linkedFramework("CoreLocation"), - .linkedFramework("MapKit") - ] - ), - .target( - name: "Photos", - dependencies: ["Texture"], - cSettings: [ - .define("AS_USE_PHOTOS", to: "1") - ], - linkerSettings: [ - .linkedFramework("Photos") - ] - ), - .target( - name: "AssetsLibrary", - dependencies: ["Texture"], - cSettings: [ - .define("AS_USE_ASSETS_LIBRARY", to: "1") - ], - linkerSettings: [ - .linkedFramework("AssetsLibrary") - ] ) ] ) From 32f2a36b21aeb494135c50a1aee7fe7d597d693b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20=C5=9Aredzi=C5=84ski?= Date: Thu, 5 Dec 2024 15:35:56 +0100 Subject: [PATCH 4/9] Update Package.swift --- Package.swift | 71 ++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 62 insertions(+), 9 deletions(-) diff --git a/Package.swift b/Package.swift index 94dde3c0d..ff0e3f155 100644 --- a/Package.swift +++ b/Package.swift @@ -1,15 +1,19 @@ -// swift-tools-version: 5.7 +// swift-tools-version:5.7 + import PackageDescription let package = Package( name: "Texture", platforms: [ - .iOS(.v14), + .iOS(.v14), // Set iOS deployment target to match the podspec .tvOS(.v14) ], products: [ - .library(name: "Texture", targets: ["Texture"]), - + .library( + name: "Texture", + targets: ["Texture"] + ) + ], dependencies: [ .package(url: "https://github.com/pinterest/PINRemoteImage.git", from: "3.0.0"), .package(url: "https://github.com/Instagram/IGListKit.git", from: "4.0.0"), @@ -18,12 +22,61 @@ let package = Package( targets: [ .target( name: "Texture", + dependencies: [ + .target(name: "Core"), + .product(name: "PINRemoteImage", package: "PINRemoteImage"), + .product(name: "IGListKit", package: "IGListKit"), + .product(name: "Yoga", package: "yoga") + ], path: "Source", - publicHeadersPath: "./", - cxxSettings: [ - .define("CLANG_CXX_LANGUAGE_STANDARD", to: "c++11"), - .define("CLANG_CXX_LIBRARY", to: "libc++") + exclude: [ + "AsyncDisplayKit+Tips", + "Examples", + "Tests" + ], + publicHeadersPath: "AsyncDisplayKit", + cSettings: [ + .headerSearchPath("Source"), + .headerSearchPath("Source/Details"), + .headerSearchPath("Source/Layout"), + .headerSearchPath("Source/Base"), + .headerSearchPath("Source/Debug"), + .headerSearchPath("Source/TextKit"), + .headerSearchPath("Source/TextExperiment"), + .define("USE_TEXTURE") ] + ), + .target( + name: "Core", + dependencies: [], + path: "Source/Core" + ), + .testTarget( + name: "TextureTests", + dependencies: ["Texture"], + path: "Tests" + ), + .target( + name: "PINRemoteImage", + dependencies: [ + .product(name: "PINRemoteImage", package: "PINRemoteImage") + ], + path: "Source/PINRemoteImage" + ), + .target( + name: "IGListKit", + dependencies: [ + .product(name: "IGListKit", package: "IGListKit") + ], + path: "Source/IGListKit" + ), + .target( + name: "Yoga", + dependencies: [ + .product(name: "Yoga", package: "yoga") + ], + path: "Source/Yoga" ) - ] + ], + swiftLanguageVersions: [.v5] ) From 1d4d838eefbb66e73e437a4a5786e96c0f3cf836 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20=C5=9Aredzi=C5=84ski?= Date: Thu, 5 Dec 2024 15:40:01 +0100 Subject: [PATCH 5/9] Update Package.swift --- Package.swift | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Package.swift b/Package.swift index ff0e3f155..435173184 100644 --- a/Package.swift +++ b/Package.swift @@ -1,11 +1,7 @@ -// swift-tools-version:5.7 - -import PackageDescription - let package = Package( name: "Texture", platforms: [ - .iOS(.v14), // Set iOS deployment target to match the podspec + .iOS(.v14), .tvOS(.v14) ], products: [ @@ -16,8 +12,8 @@ let package = Package( ], dependencies: [ .package(url: "https://github.com/pinterest/PINRemoteImage.git", from: "3.0.0"), - .package(url: "https://github.com/Instagram/IGListKit.git", from: "4.0.0"), - .package(url: "https://github.com/facebook/yoga.git", from: "2.0.0") + .package(url: "https://github.com/Instagram/IGListKit.git", .upToNextMajor(from: "4.0.0")), + .package(url: "https://github.com/facebook/yoga.git", .exact("2.0.0")) ], targets: [ .target( From 1503ad4df94f1fab2618053c009d8e46f724c524 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20=C5=9Aredzi=C5=84ski?= Date: Thu, 5 Dec 2024 15:40:53 +0100 Subject: [PATCH 6/9] Update Package.swift --- Package.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Package.swift b/Package.swift index 435173184..fb1121439 100644 --- a/Package.swift +++ b/Package.swift @@ -1,3 +1,6 @@ +// swift-tools-version: 5.7 +import PackageDescription + let package = Package( name: "Texture", platforms: [ From 1a3ec29aabf722a15a0acb58791b42d1f3b0b9fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20=C5=9Aredzi=C5=84ski?= Date: Thu, 5 Dec 2024 15:43:50 +0100 Subject: [PATCH 7/9] Update Package.swift --- Package.swift | 124 ++++++++++++++++++++++++-------------------------- 1 file changed, 60 insertions(+), 64 deletions(-) diff --git a/Package.swift b/Package.swift index fb1121439..641bcedac 100644 --- a/Package.swift +++ b/Package.swift @@ -1,81 +1,77 @@ -// swift-tools-version: 5.7 +// swift-tools-version:5.3 +// The swift-tools-version declares the minimum version of Swift required to build this package. + import PackageDescription +let headersSearchPath: [CSetting] = [.headerSearchPath("."), + .headerSearchPath("Base"), + .headerSearchPath("Debug"), + .headerSearchPath("Details"), + .headerSearchPath("Details/Transactions"), + .headerSearchPath("Layout"), + .headerSearchPath("Private"), + .headerSearchPath("Private/Layout"), + .headerSearchPath("TextExperiment/Component"), + .headerSearchPath("TextExperiment/String"), + .headerSearchPath("TextExperiment/Utility"), + .headerSearchPath("TextKit"), + .headerSearchPath("tvOS"),] + +let sharedDefines: [CSetting] = [ + // Disable "old" textnode by default for SPM + .define("AS_ENABLE_TEXTNODE", to: "0"), + + // PINRemoteImage always available for Texture + .define("AS_PIN_REMOTE_IMAGE", to: "1"), + + // always disabled + .define("IG_LIST_COLLECTION_VIEW", to: "0"),] + +func IGListKit(enabled: Bool) -> [CSetting] { + let state: String = enabled ? "1" : "0" + return [ + .define("AS_IG_LIST_KIT", to: state), + .define("AS_IG_LIST_DIFF_KIT", to: state), + ] +} + + let package = Package( name: "Texture", platforms: [ - .iOS(.v14), - .tvOS(.v14) - ], + .macOS(.v10_15), + .iOS(.v10), + .tvOS(.v10) + ], products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "AsyncDisplayKit", + type: .static, + targets: ["AsyncDisplayKit"]), .library( - name: "Texture", - targets: ["Texture"] - ) + name: "AsyncDisplayKitIGListKit", + type: .static, + targets: ["AsyncDisplayKitIGListKit"]), ], dependencies: [ - .package(url: "https://github.com/pinterest/PINRemoteImage.git", from: "3.0.0"), - .package(url: "https://github.com/Instagram/IGListKit.git", .upToNextMajor(from: "4.0.0")), - .package(url: "https://github.com/facebook/yoga.git", .exact("2.0.0")) + .package(url: "https://github.com/pinterest/PINRemoteImage.git", .branch("master")), + .package(url: "https://github.com/3a4oT/IGListKit", .branch("spmNumber10")), ], targets: [ .target( - name: "Texture", - dependencies: [ - .target(name: "Core"), - .product(name: "PINRemoteImage", package: "PINRemoteImage"), - .product(name: "IGListKit", package: "IGListKit"), - .product(name: "Yoga", package: "yoga") - ], - path: "Source", - exclude: [ - "AsyncDisplayKit+Tips", - "Examples", - "Tests" - ], - publicHeadersPath: "AsyncDisplayKit", - cSettings: [ - .headerSearchPath("Source"), - .headerSearchPath("Source/Details"), - .headerSearchPath("Source/Layout"), - .headerSearchPath("Source/Base"), - .headerSearchPath("Source/Debug"), - .headerSearchPath("Source/TextKit"), - .headerSearchPath("Source/TextExperiment"), - .define("USE_TEXTURE") - ] + name: "AsyncDisplayKit", + dependencies: ["PINRemoteImage"], + path: "spm/Sources/AsyncDisplayKit", + cSettings: headersSearchPath + sharedDefines + IGListKit(enabled: false) ), .target( - name: "Core", - dependencies: [], - path: "Source/Core" + name: "AsyncDisplayKitIGListKit", + dependencies: ["IGListKit", "PINRemoteImage"], + path: "spm/Sources/AsyncDisplayKitIGListKit/AsyncDisplayKit", + cSettings: headersSearchPath + sharedDefines + IGListKit(enabled: true) ), - .testTarget( - name: "TextureTests", - dependencies: ["Texture"], - path: "Tests" - ), - .target( - name: "PINRemoteImage", - dependencies: [ - .product(name: "PINRemoteImage", package: "PINRemoteImage") - ], - path: "Source/PINRemoteImage" - ), - .target( - name: "IGListKit", - dependencies: [ - .product(name: "IGListKit", package: "IGListKit") - ], - path: "Source/IGListKit" - ), - .target( - name: "Yoga", - dependencies: [ - .product(name: "Yoga", package: "yoga") - ], - path: "Source/Yoga" - ) ], - swiftLanguageVersions: [.v5] + cLanguageStandard: .c11, + cxxLanguageStandard: .cxx11 ) From ee481aab4ca474df1a0a4551d6f53d8c33673c24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20S=CC=81redzin=CC=81ski?= Date: Thu, 5 Dec 2024 16:11:40 +0100 Subject: [PATCH 8/9] test --- .../contents.xcworkspacedata | 7 +++ Package.resolved | 32 +++++++++++++ Package.swift | 46 ++++--------------- Podfile.lock | 20 ++++++++ 4 files changed, 68 insertions(+), 37 deletions(-) create mode 100644 .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata create mode 100644 Package.resolved create mode 100644 Podfile.lock diff --git a/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata new file mode 100644 index 000000000..919434a62 --- /dev/null +++ b/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Package.resolved b/Package.resolved new file mode 100644 index 000000000..30cde4da2 --- /dev/null +++ b/Package.resolved @@ -0,0 +1,32 @@ +{ + "pins" : [ + { + "identity" : "pincache", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pinterest/PINCache.git", + "state" : { + "revision" : "2fb85948463292c2e824148cf17dc62a4c217a94", + "version" : "3.0.4" + } + }, + { + "identity" : "pinoperation", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pinterest/PINOperation.git", + "state" : { + "revision" : "a74f978733bdaf982758bfa23d70a189f4b4c1b6", + "version" : "1.2.3" + } + }, + { + "identity" : "pinremoteimage", + "kind" : "remoteSourceControl", + "location" : "https://github.com/pinterest/PINRemoteImage.git", + "state" : { + "branch" : "master", + "revision" : "26818dc4ad9ca5ce3064e23524c4ac06e873076b" + } + } + ], + "version" : 2 +} diff --git a/Package.swift b/Package.swift index 641bcedac..10191f2d3 100644 --- a/Package.swift +++ b/Package.swift @@ -1,6 +1,4 @@ -// swift-tools-version:5.3 -// The swift-tools-version declares the minimum version of Swift required to build this package. - +// swift-tools-version:5.7 import PackageDescription let headersSearchPath: [CSetting] = [.headerSearchPath("."), @@ -27,51 +25,25 @@ let sharedDefines: [CSetting] = [ // always disabled .define("IG_LIST_COLLECTION_VIEW", to: "0"),] -func IGListKit(enabled: Bool) -> [CSetting] { - let state: String = enabled ? "1" : "0" - return [ - .define("AS_IG_LIST_KIT", to: state), - .define("AS_IG_LIST_DIFF_KIT", to: state), - ] -} - - let package = Package( - name: "Texture", + name: "AsyncDisplayKit", platforms: [ - .macOS(.v10_15), - .iOS(.v10), - .tvOS(.v10) - ], + .iOS(.v8) + ], products: [ - // Products define the executables and libraries a package produces, and make them visible to other packages. .library( name: "AsyncDisplayKit", - type: .static, - targets: ["AsyncDisplayKit"]), - .library( - name: "AsyncDisplayKitIGListKit", - type: .static, - targets: ["AsyncDisplayKitIGListKit"]), + targets: ["AsyncDisplayKit"] + ) ], dependencies: [ .package(url: "https://github.com/pinterest/PINRemoteImage.git", .branch("master")), - .package(url: "https://github.com/3a4oT/IGListKit", .branch("spmNumber10")), ], targets: [ .target( name: "AsyncDisplayKit", dependencies: ["PINRemoteImage"], - path: "spm/Sources/AsyncDisplayKit", - cSettings: headersSearchPath + sharedDefines + IGListKit(enabled: false) - ), - .target( - name: "AsyncDisplayKitIGListKit", - dependencies: ["IGListKit", "PINRemoteImage"], - path: "spm/Sources/AsyncDisplayKitIGListKit/AsyncDisplayKit", - cSettings: headersSearchPath + sharedDefines + IGListKit(enabled: true) - ), - ], - cLanguageStandard: .c11, - cxxLanguageStandard: .cxx11 + path: "Source" + ) + ] ) diff --git a/Podfile.lock b/Podfile.lock new file mode 100644 index 000000000..b2492c546 --- /dev/null +++ b/Podfile.lock @@ -0,0 +1,20 @@ +PODS: + - iOSSnapshotTestCase/Core (8.0.0) + - OCMock (3.9.4) + +DEPENDENCIES: + - iOSSnapshotTestCase/Core (~> 8.0) + - OCMock (~> 3.9) + +SPEC REPOS: + trunk: + - iOSSnapshotTestCase + - OCMock + +SPEC CHECKSUMS: + iOSSnapshotTestCase: a670511f9ee3829c2b9c23e6e68f315fd7b6790f + OCMock: 589f2c84dacb1f5aaf6e4cec1f292551fe748e74 + +PODFILE CHECKSUM: 3b874fa5a23281754f91a64090a82ef01ee76cc7 + +COCOAPODS: 1.15.2 From 86b55b95c15043cbf0b2a5c53a770e721abe7899 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20S=CC=81redzin=CC=81ski?= Date: Thu, 5 Dec 2024 16:37:03 +0100 Subject: [PATCH 9/9] Package json --- Package.resolved | 32 ------------------------ Package.swift | 63 ++++++++++++++++++++---------------------------- 2 files changed, 26 insertions(+), 69 deletions(-) delete mode 100644 Package.resolved diff --git a/Package.resolved b/Package.resolved deleted file mode 100644 index 30cde4da2..000000000 --- a/Package.resolved +++ /dev/null @@ -1,32 +0,0 @@ -{ - "pins" : [ - { - "identity" : "pincache", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pinterest/PINCache.git", - "state" : { - "revision" : "2fb85948463292c2e824148cf17dc62a4c217a94", - "version" : "3.0.4" - } - }, - { - "identity" : "pinoperation", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pinterest/PINOperation.git", - "state" : { - "revision" : "a74f978733bdaf982758bfa23d70a189f4b4c1b6", - "version" : "1.2.3" - } - }, - { - "identity" : "pinremoteimage", - "kind" : "remoteSourceControl", - "location" : "https://github.com/pinterest/PINRemoteImage.git", - "state" : { - "branch" : "master", - "revision" : "26818dc4ad9ca5ce3064e23524c4ac06e873076b" - } - } - ], - "version" : 2 -} diff --git a/Package.swift b/Package.swift index 10191f2d3..14f8beafb 100644 --- a/Package.swift +++ b/Package.swift @@ -1,49 +1,38 @@ -// swift-tools-version:5.7 -import PackageDescription +// swift-tools-version: 6.0 +// The swift-tools-version declares the minimum version of Swift required to build this package. -let headersSearchPath: [CSetting] = [.headerSearchPath("."), - .headerSearchPath("Base"), - .headerSearchPath("Debug"), - .headerSearchPath("Details"), - .headerSearchPath("Details/Transactions"), - .headerSearchPath("Layout"), - .headerSearchPath("Private"), - .headerSearchPath("Private/Layout"), - .headerSearchPath("TextExperiment/Component"), - .headerSearchPath("TextExperiment/String"), - .headerSearchPath("TextExperiment/Utility"), - .headerSearchPath("TextKit"), - .headerSearchPath("tvOS"),] +import PackageDescription -let sharedDefines: [CSetting] = [ - // Disable "old" textnode by default for SPM - .define("AS_ENABLE_TEXTNODE", to: "0"), - - // PINRemoteImage always available for Texture - .define("AS_PIN_REMOTE_IMAGE", to: "1"), - - // always disabled - .define("IG_LIST_COLLECTION_VIEW", to: "0"),] +let headersSearchPath: [CSetting] = [ + .headerSearchPath("."), + .headerSearchPath("Base"), + .headerSearchPath("Debug"), + .headerSearchPath("Details"), + .headerSearchPath("Details/Transactions"), + .headerSearchPath("Layout"), + .headerSearchPath("Private"), + .headerSearchPath("Private/Layout"), + .headerSearchPath("TextExperiment/Component"), + .headerSearchPath("TextExperiment/String"), + .headerSearchPath("TextExperiment/Utility"), + .headerSearchPath("TextKit"), + .headerSearchPath("tvOS"), +] let package = Package( - name: "AsyncDisplayKit", - platforms: [ - .iOS(.v8) - ], + name: "Texture", products: [ .library( - name: "AsyncDisplayKit", - targets: ["AsyncDisplayKit"] - ) - ], - dependencies: [ - .package(url: "https://github.com/pinterest/PINRemoteImage.git", .branch("master")), + name: "Texture", + targets: ["Texture"] + ), ], targets: [ .target( - name: "AsyncDisplayKit", - dependencies: ["PINRemoteImage"], - path: "Source" + name: "Texture", + path: "Source", + publicHeadersPath: ".", + cSettings: headersSearchPath ) ] )