Skip to content

Commit

Permalink
Merge pull request #388 from Rightpoint/bugfix/spm-watchos
Browse files Browse the repository at this point in the history
Do not compile UIKit code for watchOS
  • Loading branch information
chrisballinger authored Mar 19, 2020
2 parents d949391 + cf89815 commit 921bfb2
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Sources/UIKit/AdaptableTextContainer.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016 Rightpoint. All rights reserved.
//

#if canImport(UIKit)
#if canImport(UIKit) && !os(watchOS)
import UIKit

/// A protocol to update the text style contained by the object. This can be
Expand Down
2 changes: 1 addition & 1 deletion Sources/UIKit/AdaptiveStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016 Rightpoint. All rights reserved.
//

#if canImport(UIKit)
#if canImport(UIKit) && !os(watchOS)
import UIKit

/// A few default font scaling behaviors.
Expand Down
2 changes: 1 addition & 1 deletion Sources/UIKit/AdaptiveStyleTransformation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//

#if canImport(UIKit)
#if canImport(UIKit) && !os(watchOS)
import UIKit

/// Defines a style transformation that is dependent on a `UITraitCollection`.
Expand Down
2 changes: 1 addition & 1 deletion Sources/UIKit/EmbeddedTransformation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016 Rightpoint. All rights reserved.
//

#if canImport(UIKit)
#if canImport(UIKit) && !os(watchOS)
import UIKit

/// BonMot embeds transformation objects inside `NSAttributedString` attributes
Expand Down
2 changes: 1 addition & 1 deletion Sources/UIKit/NSAttributedString+Adaptive.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//

#if canImport(UIKit)
#if canImport(UIKit) && !os(watchOS)
import UIKit

extension NSAttributedString {
Expand Down
2 changes: 1 addition & 1 deletion Sources/UIKit/StyleableUIElement.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016 Rightpoint. All rights reserved.
//

#if canImport(UIKit)
#if canImport(UIKit) && !os(watchOS)
import UIKit

extension UILabel {
Expand Down
2 changes: 1 addition & 1 deletion Sources/UIKit/Tab+Adaptive.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016 Rightpoint. All rights reserved.
//

#if canImport(UIKit)
#if canImport(UIKit) && !os(watchOS)
import UIKit

// Just declare conformance. Implementation is already defined and used even
Expand Down
4 changes: 4 additions & 0 deletions Sources/UIKit/TextAlignmentConstraint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
// Copyright © 2016 Rightpoint. All rights reserved.
//

#if !os(watchOS)

#if os(OSX)
import AppKit
#else
Expand Down Expand Up @@ -238,3 +240,5 @@ private extension String {
}

}

#endif
2 changes: 1 addition & 1 deletion Sources/UIKit/Tracking+Adaptive.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016 Rightpoint. All rights reserved.
//

#if canImport(UIKit)
#if canImport(UIKit) && !os(watchOS)
import UIKit

extension Tracking: AdaptiveStyleTransformation {
Expand Down
2 changes: 1 addition & 1 deletion Sources/UIKit/UIKit+AdaptableTextContainerSupport.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// Copyright © 2016 Rightpoint. All rights reserved.
//

#if canImport(UIKit)
#if canImport(UIKit) && !os(watchOS)
import UIKit

extension UIApplication {
Expand Down
2 changes: 1 addition & 1 deletion Sources/UIKit/UIKit+Helpers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
//
//

#if canImport(UIKit)
#if canImport(UIKit) && !os(watchOS)
import UIKit

// UIKit helpers for iOS and tvOS
Expand Down

0 comments on commit 921bfb2

Please sign in to comment.