Skip to content
This repository was archived by the owner on Sep 19, 2024. It is now read-only.

Add support for SPM with WatchOS platform #39

Merged
merged 1 commit into from
Mar 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Library/UIKit/NibResource+UIKit.swift
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import Foundation
import UIKit

@@ -23,3 +24,4 @@ public extension NibResourceType {
return UINib(resource: self).instantiate(withOwner: ownerOrNil, options: optionsOrNil)
}
}
#endif
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import Foundation
import UIKit

@@ -20,3 +21,4 @@ public extension StoryboardResourceWithInitialControllerType {
return UIStoryboard(resource: self).instantiateInitialViewController() as? InitialController
}
}
#endif
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import Foundation
import UIKit

@@ -33,3 +34,4 @@ extension TypedStoryboardSegueInfo {
self.destination = destination
}
}
#endif
2 changes: 2 additions & 0 deletions Library/UIKit/UICollectionView+ReuseIdentifierProtocol.swift
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import Foundation
import UIKit

@@ -62,3 +63,4 @@ public extension UICollectionView {
register(UINib(resource: nibResource), forSupplementaryViewOfKind: kind, withReuseIdentifier: nibResource.identifier)
}
}
#endif
2 changes: 2 additions & 0 deletions Library/UIKit/UINib+NibResource.swift
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import UIKit

public extension UINib {
@@ -21,3 +22,4 @@ public extension UINib {
self.init(nibName: resource.name, bundle: resource.bundle)
}
}
#endif
2 changes: 2 additions & 0 deletions Library/UIKit/UIStoryboard+StoryboardResource.swift
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import UIKit

public extension UIStoryboard {
@@ -21,3 +22,4 @@ public extension UIStoryboard {
self.init(name: resource.name, bundle: resource.bundle)
}
}
#endif
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import Foundation
import UIKit

@@ -22,3 +23,4 @@ public extension UIStoryboard {
return self.instantiateViewController(withIdentifier: resource.identifier) as? ViewControllerResource.ViewControllerType
}
}
#endif
2 changes: 2 additions & 0 deletions Library/UIKit/UITableView+ReuseIdentifierProtocol.swift
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import Foundation
import UIKit

@@ -65,3 +66,4 @@ public extension UITableView {
register(UINib(resource: nibResource), forHeaderFooterViewReuseIdentifier: nibResource.identifier)
}
}
#endif
2 changes: 2 additions & 0 deletions Library/UIKit/UIViewController+NibResource.swift
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import Foundation
import UIKit

@@ -22,3 +23,4 @@ public extension UIViewController {
self.init(nibName: nib.name, bundle: nib.bundle)
}
}
#endif
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import Foundation
import UIKit

@@ -37,3 +38,4 @@ public extension StoryboardSegue where Source : UIViewController {
source.performSegue(withIdentifier: identifier.identifier, sender: sender)
}
}
#endif