Skip to content

Commit 80778cf

Browse files
authored
Merge pull request #89 from MortyMerr/master
Fix SPM support
2 parents 3f2491c + 5ac3c21 commit 80778cf

8 files changed

Lines changed: 15 additions & 1 deletion

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ let package = Package(
1515
sources: ["Sources"]
1616
)
1717
],
18-
swiftLanguageVersions: [3, 4, 5]
18+
swiftLanguageVersions: [.v4, .v5]
1919
)

Sources/Storyboard/StoryboardBased.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*
77
*********************************************/
88

9+
#if canImport(UIKit)
910
import UIKit
1011

1112
// MARK: Protocol Definition
@@ -45,3 +46,4 @@ public extension StoryboardBased where Self: UIViewController {
4546
return typedViewController
4647
}
4748
}
49+
#endif

Sources/Storyboard/StoryboardSceneBased.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*
77
*********************************************/
88

9+
#if canImport(UIKit)
910
import UIKit
1011

1112
// MARK: Protocol Definition
@@ -51,3 +52,4 @@ public extension StoryboardSceneBased where Self: UIViewController {
5152
return typedViewController
5253
}
5354
}
55+
#endif

Sources/View/NibLoadable.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*
77
*********************************************/
88

9+
#if canImport(UIKit)
910
import UIKit
1011

1112
// MARK: Protocol Definition
@@ -45,3 +46,4 @@ public extension NibLoadable where Self: UIView {
4546
return view
4647
}
4748
}
49+
#endif

Sources/View/NibOwnerLoadable.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*
77
*********************************************/
88

9+
#if canImport(UIKit)
910
import UIKit
1011

1112
// MARK: Protocol Definition
@@ -52,6 +53,7 @@ public extension NibOwnerLoadable where Self: UIView {
5253
}
5354
}
5455
}
56+
#endif
5557

5658
/// Swift < 4.2 support
5759
#if !(swift(>=4.2))

Sources/View/Reusable.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*
77
*********************************************/
88

9+
#if canImport(UIKit)
910
import UIKit
1011

1112
// MARK: Protocol definition
@@ -31,3 +32,4 @@ public extension Reusable {
3132
return String(describing: self)
3233
}
3334
}
35+
#endif

Sources/View/UICollectionView+Reusable.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*
77
*********************************************/
88

9+
#if canImport(UIKit)
910
import UIKit
1011

1112
// MARK: Reusable support for UICollectionView
@@ -128,3 +129,4 @@ public extension UICollectionView {
128129
return typedView
129130
}
130131
}
132+
#endif

Sources/View/UITableView+Reusable.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*
77
*********************************************/
88

9+
#if canImport(UIKit)
910
import UIKit
1011

1112
// MARK: Reusable support for UITableView
@@ -108,3 +109,4 @@ public extension UITableView {
108109
return view
109110
}
110111
}
112+
#endif

0 commit comments

Comments
 (0)