Skip to content

Commit aec7fcb

Browse files
committed
Exclude NestedBatchUpdates from watchOS
1 parent f9df518 commit aec7fcb

3 files changed

Lines changed: 20 additions & 6 deletions

File tree

Differ.podspec

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,20 @@ Also included are utilities for easily applying diffs and patches to `UICollecti
1919
s.source = { :git => "https://github.com/tonyarnold/Differ.git", :tag => "1.1.1" }
2020
s.source_files = "Sources/Differ"
2121

22-
s.platforms = { :ios => "8.0", :osx => "10.10", :tvos => "9.0", :watchos => "3.0" }
22+
s.platforms = { :ios => "8.0", :osx => "10.11", :tvos => "9.0", :watchos => "3.0" }
2323
s.pod_target_xcconfig = { 'SWIFT_VERSION' => '4.1' }
24-
s.ios.exclude_files = ["Sources/Differ/Diff+AppKit.swift"]
25-
s.osx.exclude_files = ["Sources/Differ/Diff+UIKit.swift"]
26-
s.tvos.exclude_files = ["Sources/Differ/Diff+AppKit.swift"]
27-
s.watchos.exclude_files = ["Sources/Differ/Diff+UIKit.swift", "Sources/Differ/Diff+AppKit.swift"]
24+
s.ios.exclude_files = [
25+
"Sources/Differ/Diff+AppKit.swift"
26+
]
27+
s.osx.exclude_files = [
28+
"Sources/Differ/Diff+UIKit.swift"
29+
]
30+
s.tvos.exclude_files = [
31+
"Sources/Differ/Diff+AppKit.swift"
32+
]
33+
s.watchos.exclude_files = [
34+
"Sources/Differ/Diff+UIKit.swift",
35+
"Sources/Differ/Diff+AppKit.swift",
36+
"Sources/Differ/NestedBatchUpdate.swift"
37+
]
2838
end

Sources/Differ/Diff+UIKit.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#if canImport(UIKit)
1+
#if canImport(UIKit) && !os(watchOS)
22
import UIKit
33

44
extension BatchUpdate {

Sources/Differ/NestedBatchUpdate.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
//
22
// Copyright © 2018 wczekalski. All rights reserved.
33

4+
#if !os(watchOS)
45
import Foundation
56

67
struct NestedBatchUpdate {
@@ -48,3 +49,6 @@ struct NestedBatchUpdate {
4849
self.sectionDeletions = sectionDeletions
4950
}
5051
}
52+
53+
#endif
54+

0 commit comments

Comments
 (0)