Skip to content

Commit

Permalink
Remove SyncStatus, update availability
Browse files Browse the repository at this point in the history
Should be able to add this as a dependency in iOS 13, macOS 10.15 or tvOS 13 and
have it properly state that it's only available in iOS 14, macOS 11, and tvOS 14.
Tests pass on iOS 14, macOS 10.15 and tvOS 14.
  • Loading branch information
ggruen committed Sep 25, 2020
1 parent 998eeb6 commit 978ae8c
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 306 deletions.
4 changes: 4 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ import PackageDescription

let package = Package(
name: "CloudKitSyncMonitor",
// platforms is set so you can include this package in projects that target iOS 13/macOS 10.15/tvOS 13 without
// getting errors, but the code in it is marked avaliable only for macOS 11 and iOS 14.
// It compiles and the tests pass on tvOS 14, but I haven't used it in a tvOS app.
platforms: [.macOS(.v10_15), .iOS(.v13), .tvOS(.v13)],
products: [
// Products define the executables and libraries a package produces, and make them visible to other packages.
.library(
Expand Down
2 changes: 1 addition & 1 deletion Sources/CloudKitSyncMonitor/SyncMonitor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ import SwiftUI
/// }
/// }
///
@available(iOS 14.0, *)
@available(iOS 14.0, macCatalyst 14.0, OSX 11, tvOS 14.0, *)
public class SyncMonitor: ObservableObject {
/// A singleton to use
public static let shared = SyncMonitor()
Expand Down
221 changes: 0 additions & 221 deletions Sources/CloudKitSyncMonitor/SyncStatus.swift

This file was deleted.

2 changes: 1 addition & 1 deletion Tests/CloudKitSyncMonitorTests/SyncMonitorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import XCTest
import CoreData
@testable import CloudKitSyncMonitor

@available(iOS 14.0, *)
@available(iOS 14.0, macCatalyst 14.0, OSX 11, tvOS 14.0, *)
final class SyncMonitorTests: XCTestCase {
func testCanDetectImportError() {
// Given an active network connection
Expand Down
82 changes: 0 additions & 82 deletions Tests/CloudKitSyncMonitorTests/SyncStatusTests.swift

This file was deleted.

2 changes: 1 addition & 1 deletion Tests/CloudKitSyncMonitorTests/XCTestManifests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import XCTest
#if !canImport(ObjectiveC)
public func allTests() -> [XCTestCaseEntry] {
return [
testCase(SyncStatusTests.allTests),
testCase(SyncMonitorTests.allTests),
]
}
#endif

0 comments on commit 978ae8c

Please sign in to comment.