Skip to content

Commit

Permalink
Update Subject+Rx.swift
Browse files Browse the repository at this point in the history
Added `@available` attributes to types that can be imported but fail to compile if Pods build target < 13.0 in Xcode 12.5
  • Loading branch information
schlossm authored and freak4pc committed Feb 3, 2021
1 parent 86ef794 commit 3b359e4
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/Combine+Rx/Subject+Rx.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import RxRelay
///
/// - note: This only works when the underlying Failure is Swift.Error,
/// since RxSwift has no typed errors.
@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public protocol AnyObserverConvertible: Combine.Subject where Failure == Swift.Error {
associatedtype Output

Expand All @@ -25,6 +26,7 @@ public protocol AnyObserverConvertible: Combine.Subject where Failure == Swift.E
func asAnyObserver() -> AnyObserver<Output>
}

@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public extension AnyObserverConvertible {
/// Returns a RxSwift AnyObserver wrapping the Subject
///
Expand All @@ -49,6 +51,7 @@ extension PassthroughSubject: AnyObserverConvertible where Failure == Swift.Erro
@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension CurrentValueSubject: AnyObserverConvertible where Failure == Swift.Error {}

@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
public extension ObservableConvertibleType {
/**
Creates new subscription and sends elements to a Combine Subject.
Expand Down

0 comments on commit 3b359e4

Please sign in to comment.