Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Set platform requirements and bump dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
gonzalezreal committed Aug 29, 2021
1 parent bf076de commit 66abfa9
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 24 deletions.
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"repositoryURL": "https://github.com/pointfreeco/swift-snapshot-testing",
"state": {
"branch": null,
"revision": "c466812aa2e22898f27557e2e780d3aad7a27203",
"version": "1.8.2"
"revision": "f8a9c997c3c1dab4e216a8ec9014e23144cbab37",
"version": "1.9.0"
}
}
]
Expand Down
8 changes: 4 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import PackageDescription
let package = Package(
name: "AttributedText",
platforms: [
.macOS(.v10_12),
.iOS(.v11),
.tvOS(.v11),
.macOS(.v10_15),
.iOS(.v13),
.tvOS(.v13),
],
products: [
.library(
Expand All @@ -20,7 +20,7 @@ let package = Package(
.package(
name: "SnapshotTesting",
url: "https://github.com/pointfreeco/swift-snapshot-testing",
from: "1.8.2"
from: "1.9.0"
),
],
targets: [
Expand Down
4 changes: 1 addition & 3 deletions Sources/AttributedText/AttributedText.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if canImport(SwiftUI) && !os(watchOS)

#if !os(watchOS)
import SwiftUI

@available(macOS 11.0, iOS 14.0, tvOS 14.0, *)
Expand Down Expand Up @@ -34,5 +33,4 @@
size.width - safeAreaInsets.leading - safeAreaInsets.trailing
}
}

#endif
4 changes: 1 addition & 3 deletions Sources/AttributedText/NSLineBreakMode+TruncationMode.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if canImport(SwiftUI) && !os(watchOS)

#if !os(watchOS)
import SwiftUI

extension NSLineBreakMode {
Expand All @@ -17,5 +16,4 @@
}
}
}

#endif
4 changes: 1 addition & 3 deletions Sources/AttributedText/TextViewStore.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if canImport(SwiftUI) && !os(watchOS)

#if !os(watchOS)
import SwiftUI

@available(macOS 11.0, iOS 14.0, tvOS 14.0, *)
Expand All @@ -10,5 +9,4 @@
intrinsicContentSize = textView.intrinsicContentSize
}
}

#endif
4 changes: 1 addition & 3 deletions Sources/AttributedText/TextViewWrapper+NSTextView.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if canImport(SwiftUI) && os(macOS)

#if os(macOS)
import SwiftUI

@available(macOS 11.0, *)
Expand Down Expand Up @@ -75,5 +74,4 @@
Coordinator()
}
}

#endif
3 changes: 0 additions & 3 deletions Sources/AttributedText/TextViewWrapper+UITextView.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if canImport(UIKit) && !os(watchOS)

import SwiftUI

@available(iOS 14.0, tvOS 14.0, macCatalyst 14.0, *)
Expand Down Expand Up @@ -59,13 +58,11 @@
uiView.textContainer.lineBreakMode = NSLineBreakMode(truncationMode: context.environment.truncationMode)

context.coordinator.openURL = context.environment.openURL

textViewStore.didUpdateTextView(uiView)
}

func makeCoordinator() -> Coordinator {
Coordinator()
}
}

#endif
4 changes: 1 addition & 3 deletions Tests/AttributedTextTests/AttributedTextTests.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#if canImport(SwiftUI) && !os(macOS) && !targetEnvironment(macCatalyst)

#if !os(macOS) && !targetEnvironment(macCatalyst)
import SnapshotTesting
import SwiftUI
import XCTest
Expand Down Expand Up @@ -55,5 +54,4 @@
result.addAttributes([.font: UIFont.preferredFont(forTextStyle: .body)], range: NSRange(location: 33, length: 192))
return result
}

#endif

0 comments on commit 66abfa9

Please sign in to comment.