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

Commit

Permalink
Merge pull request #39 from niorko/master
Browse files Browse the repository at this point in the history
Add support for SPM with WatchOS platform
  • Loading branch information
tomlokhorst authored Mar 4, 2021
2 parents 5025163 + 6d6d67d commit 8998cfe
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Library/UIKit/NibResource+UIKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import Foundation
import UIKit

Expand All @@ -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
Expand Up @@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import Foundation
import UIKit

Expand All @@ -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
Expand Up @@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import Foundation
import UIKit

Expand All @@ -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
Expand Up @@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import Foundation
import UIKit

Expand Down Expand Up @@ -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
Expand Up @@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import UIKit

public extension UINib {
Expand All @@ -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
Expand Up @@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import UIKit

public extension UIStoryboard {
Expand All @@ -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
Expand Up @@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import Foundation
import UIKit

Expand All @@ -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
Expand Up @@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import Foundation
import UIKit

Expand Down Expand Up @@ -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
Expand Up @@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import Foundation
import UIKit

Expand All @@ -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
Expand Up @@ -7,6 +7,7 @@
// License: MIT License
//

#if !os(watchOS)
import Foundation
import UIKit

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

0 comments on commit 8998cfe

Please sign in to comment.