Properly target packages for CI build
Seto Elkahfi committed
Aug 15, 2023 at 14:59 UTC
ac2af453fb936ffb96deb78b6e0314ac869cf6fc
4 files changed
+14
Sources/JomloTableView/JomloTableView.swift
+3
@@ -7,6 +7,7 @@
7
//
8
9
import Foundation
10
+#if canImport(UIKit)
11
import UIKit
12
13
/**
@@ -15,6 +16,7 @@ import UIKit
16
view controller that use table view free from conforming these two protocols.
17
18
*/
19
+@available(iOS 11.0, tvOS 11.0, *)
20
public class JomloTableView: UITableView {
21
22
// Table view section
@@ -97,3 +99,4 @@ extension JomloTableView: UITableViewDataSource {
99
}
100
101
}
102
+#endif
Sources/JomloTableView/JomloTableViewCell.swift
+3
@@ -7,8 +7,11 @@
7
//
8
9
import Foundation
10
+#if canImport(UIKit)
11
import UIKit
12
13
+@available(iOS 11.0, tvOS 11.0, *)
14
open class JomloTableViewCell: UITableViewCell {
15
16
}
17
+#endif
Sources/JomloTableView/JomloTableViewRow.swift
+4
@@ -7,12 +7,15 @@
7
//
8
9
import Foundation
10
+#if canImport(UIKit)
11
import UIKit
12
13
/**
14
A singe row to be inserted in an instance of JomloTableViewSection. Subclass from this class and reference the identifier
15
that used by its corresponding cell view. The cell is a subclass from JomloTableViewCell.
16
*/
17
+
18
+@available(iOS 11.0, tvOS 11.0, *)
19
open class JomloTableViewRow: NSObject {
20
21
// Callback for on row clicked.
@@ -60,3 +63,4 @@ open class JomloTableViewRow: NSObject {
63
}
64
65
}
66
+#endif
Sources/JomloTableView/JomloTableViewSection.swift
+4
@@ -7,7 +7,10 @@
7
//
8
9
import Foundation
10
+#if canImport(UIKit)
11
+import UIKit
12
13
+@available(iOS 11.0, tvOS 11.0, *)
14
public class JomloTableViewSection {
15
16
/**
@@ -52,3 +55,4 @@ public class JomloTableViewSection {
55
}
56
57
}
58
+#endif