diff --git a/Package.swift b/Package.swift index 3676cb4..f70f52c 100644 --- a/Package.swift +++ b/Package.swift @@ -6,12 +6,12 @@ import PackageDescription let package = Package( name: "Occurrence", platforms: [ - .macOS(.v13), - .macCatalyst(.v16), - .iOS(.v16), - .tvOS(.v16), - .watchOS(.v9), - .visionOS(.v1), // .v2 ~ iOS 18 + .macOS(.v15), + .macCatalyst(.v18), + .iOS(.v18), + .tvOS(.v18), + .watchOS(.v11), + .visionOS(.v2), ], products: [ // Products define the executables and libraries a package produces, and make them visible to other packages. diff --git a/Sources/Occurrence/CoreData/CoreDataLogProvider.swift b/Sources/Occurrence/CoreData/CoreDataLogProvider.swift index 64ae277..36953b1 100644 --- a/Sources/Occurrence/CoreData/CoreDataLogProvider.swift +++ b/Sources/Occurrence/CoreData/CoreDataLogProvider.swift @@ -1,8 +1,8 @@ import Foundation import Logging -import Mutex #if canImport(CoreData) @preconcurrency import CoreData +import Synchronization final class CoreDataLogProvider: LogProvider { diff --git a/Sources/Occurrence/CoreData/LogModel.swift b/Sources/Occurrence/CoreData/LogModel.swift index 3086da1..e4cb640 100644 --- a/Sources/Occurrence/CoreData/LogModel.swift +++ b/Sources/Occurrence/CoreData/LogModel.swift @@ -1,7 +1,7 @@ import Foundation -import Mutex #if canImport(CoreData) import CoreData +import Synchronization enum LogModel { case version_1_0_0 diff --git a/Sources/Occurrence/Occurrence.swift b/Sources/Occurrence/Occurrence.swift index e5d2688..c20e005 100644 --- a/Sources/Occurrence/Occurrence.swift +++ b/Sources/Occurrence/Occurrence.swift @@ -1,6 +1,10 @@ import Foundation import Logging +#if canImport(Synchronization) +import Synchronization +#else import Mutex +#endif public struct Occurrence: LogHandler { diff --git a/Sources/Occurrence/Streamer/OccurrenceLogStreamer.swift b/Sources/Occurrence/Streamer/OccurrenceLogStreamer.swift index 940a571..3f0a992 100644 --- a/Sources/Occurrence/Streamer/OccurrenceLogStreamer.swift +++ b/Sources/Occurrence/Streamer/OccurrenceLogStreamer.swift @@ -1,6 +1,10 @@ import Foundation import Logging +#if canImport(Synchronization) +import Synchronization +#else import Mutex +#endif final class OccurrenceLogStreamer: LogStreamer { diff --git a/Sources/Occurrence/SwiftUI/LogView.swift b/Sources/Occurrence/SwiftUI/LogView.swift index 98fd68a..695b9bb 100644 --- a/Sources/Occurrence/SwiftUI/LogView.swift +++ b/Sources/Occurrence/SwiftUI/LogView.swift @@ -84,6 +84,7 @@ public struct LogView: View { .toolbar { ToolbarItemGroup(placement: .primaryAction) { if allowManagement { + #if !os(watchOS) Menu { Text("Subsystem") @@ -131,6 +132,7 @@ public struct LogView: View { } label: { Label("Trash", systemImage: "trash") } + #endif } Toggle(isOn: $live) {