Skip to content

Adds Swift Concurrency Availability to macOS 10.15, iOS 13, tvOS 13, and watchOS 6 #118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions Sources/Lifecycle/Lifecycle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ public struct LifecycleHandler {
}
}

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

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

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