Skip to content
This repository was archived by the owner on Dec 5, 2022. It is now read-only.

Commit 3e8d44d

Browse files
committed
fix: swift package compatibility
1 parent 29e3369 commit 3e8d44d

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

Package.swift

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
1-
// swift-tools-version:5.1
1+
// swift-tools-version:5.0
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33
import PackageDescription
44

55
let package = Package(
66
name: "DeepDiff",
7+
platforms: [
8+
.macOS(.v10_11),
9+
.iOS(.v8),
10+
.tvOS(.v11),
11+
.watchOS(.v3)
12+
],
713
products: [
8-
.library(name: "DeepDiff", targets: ["DeepDiff"])
14+
.library(name: "DeepDiff", targets: ["DeepDiff"]),
915
],
1016
targets: [
11-
.target( name: "DeepDiff", dependencies: [])
17+
.target(name: "DeepDiff", path: "Sources")
1218
]
1319
)

Sources/iOS/IndexPathConverter.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Copyright © 2018 Khoa Pham. All rights reserved.
77
//
88

9+
#if os(iOS) || os(tvOS)
910
import Foundation
1011

1112
public struct ChangeWithIndexPath {
@@ -58,3 +59,4 @@ extension Int {
5859
return IndexPath(item: self, section: section)
5960
}
6061
}
62+
#endif

Sources/iOS/UICollectionView+Extensions.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Copyright © 2018 Khoa Pham. All rights reserved.
77
//
88

9+
#if os(iOS) || os(tvOS)
910
import UIKit
1011

1112
public extension UICollectionView {
@@ -60,4 +61,4 @@ public extension UICollectionView {
6061
}
6162
}
6263
}
63-
64+
#endif

Sources/iOS/UITableView+Extensions.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
// Copyright © 2018 Khoa Pham. All rights reserved.
77
//
88

9+
#if os(iOS) || os(tvOS)
910
import UIKit
1011

1112
public extension UITableView {
@@ -91,3 +92,4 @@ public extension UITableView {
9192
}
9293
}
9394
}
95+
#endif

0 commit comments

Comments
 (0)