Skip to content

Commit

Permalink
fix combine to use only on ios 13
Browse files Browse the repository at this point in the history
  • Loading branch information
amine2233 committed Sep 5, 2020
1 parent c981f37 commit 7c292d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Sources/RetroObjectiveCombine/RetroObjective+Combine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import RetroObjective
#if canImport(Combine)
import Combine

@available(iOS 13.0, *)
extension Publishers {
public typealias RetroObjectiveDelegate = RetroObjectiveProxy & RetroObjectiveProxyType
struct RetroObjective<Delegate: RetroObjectiveDelegate>: Publisher {
Expand All @@ -26,6 +27,7 @@ extension Publishers {
}
}

@available(iOS 13.0, *)
extension Publishers.RetroObjective {
private final class SubscriptionRetroObjectiveProxy<S: Subscriber, Delegate: RetroObjectiveProxy>: Subscription where S.Input == Arguments {
private var subscriber: S?
Expand Down Expand Up @@ -54,6 +56,7 @@ extension Publishers.RetroObjective {
}
}

@available(iOS 13.0, *)
public extension Publishers {
static func proxyDelegate<Delegate: RetroObjectiveDelegate>(_ delegate: Delegate, selector: Selector) -> AnyPublisher<Arguments, Never> {
Publishers.RetroObjective(delegate: delegate, selector: selector).eraseToAnyPublisher()
Expand Down

0 comments on commit 7c292d8

Please sign in to comment.