Skip to content

Commit 08cd06b

Browse files
committed
Update availability checks for async function for all supported platforms
1 parent da0cb15 commit 08cd06b

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Sources/Lifecycle/Lifecycle.swift

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ public struct LifecycleHandler {
9595
}
9696
}
9797

98-
#if compiler(>=5.5) && canImport(_Concurrency)
99-
@available(macOS 12.0, *)
98+
#if canImport(_Concurrency) && compiler(>=5.5.2)
99+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
100100
extension LifecycleHandler {
101101
public init(_ handler: @escaping () async throws -> Void) {
102102
self = LifecycleHandler { callback in
@@ -159,8 +159,8 @@ public struct LifecycleStartHandler<State> {
159159
}
160160
}
161161

162-
#if compiler(>=5.5) && canImport(_Concurrency)
163-
@available(macOS 12.0, *)
162+
#if canImport(_Concurrency) && compiler(>=5.5.2)
163+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
164164
extension LifecycleStartHandler {
165165
public init(_ handler: @escaping () async throws -> State) {
166166
self = LifecycleStartHandler { callback in
@@ -221,8 +221,8 @@ public struct LifecycleShutdownHandler<State> {
221221
}
222222
}
223223

224-
#if compiler(>=5.5) && canImport(_Concurrency)
225-
@available(macOS 12.0, *)
224+
#if canImport(_Concurrency) && compiler(>=5.5.2)
225+
@available(macOS 10.15, iOS 13, tvOS 13, watchOS 6, *)
226226
extension LifecycleShutdownHandler {
227227
public init(_ handler: @escaping (State) async throws -> Void) {
228228
self = LifecycleShutdownHandler { state, callback in

0 commit comments

Comments
 (0)