Skip to content

Commit

Permalink
Fix build for iOS (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
luizmb committed Jan 13, 2022
1 parent d129c48 commit a2a0775
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Sources/FoundationExtensions/Combine/Publishers+Retry.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#if canImport(Combine)
import Combine
import Foundation

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Publisher {
public func retry() -> AnyPublisher<Output, Never> {
Publishers
Expand All @@ -11,6 +13,7 @@ extension Publisher {
}
}

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Publishers.Promise {
public func retry() -> Publishers.Promise<Output, Never> {
Publishers
Expand All @@ -23,3 +26,4 @@ extension Publishers.Promise {
// with success, therefore, with one value.
}
}
#endif
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import Combine
import Foundation

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension Publishers.Promise where Success == (data: Data, response: URLResponse), Failure == URLError {
public func validStatusCode() -> Publishers.Promise<Void, URLError> {
flatMap { _, response -> Publishers.Promise<Void, URLError> in
Expand Down

0 comments on commit a2a0775

Please sign in to comment.