Skip to content

Commit 48d107b

Browse files
committed
Use #if os instead of excluding source files
1 parent 5bddab0 commit 48d107b

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

Package.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,6 @@ let package = Package(
55
targets: [],
66
dependencies: [
77
.Package(url: "https://github.com/ReactiveX/RxSwift.git", majorVersion: 3)
8-
],
9-
exclude: [
10-
"Sources/Action/UIKitExtensions/AlertAction.swift",
11-
"Sources/Action/UIKitExtensions/UIBarButtonItem+Action.swift",
12-
"Sources/Action/UIKitExtensions/UIButton+Rx.swift",
138
]
149
)
1510

Sources/Action/UIKitExtensions/AlertAction.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if os(iOS) || os(tvOS)
12
import UIKit
23
import RxSwift
34
import RxCocoa
@@ -62,3 +63,4 @@ public extension Reactive where Base: UIAlertAction {
6263
}
6364
}
6465
}
66+
#endif

Sources/Action/UIKitExtensions/UIBarButtonItem+Action.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if os(iOS) || os(tvOS)
12
import UIKit
23
import RxSwift
34
import RxCocoa
@@ -37,3 +38,4 @@ public extension Reactive where Base: UIBarButtonItem {
3738
}
3839
}
3940
}
41+
#endif

Sources/Action/UIKitExtensions/UIButton+Rx.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if os(iOS) || os(tvOS)
12
import UIKit
23
import RxSwift
34
import RxCocoa
@@ -51,3 +52,4 @@ public extension Reactive where Base: UIButton {
5152
}
5253
}
5354
}
55+
#endif

0 commit comments

Comments
 (0)