Skip to content

Commit 3b359e4

Browse files
schlossmfreak4pc
authored andcommitted
Update Subject+Rx.swift
Added `@available` attributes to types that can be imported but fail to compile if Pods build target < 13.0 in Xcode 12.5
1 parent 86ef794 commit 3b359e4

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

Sources/Combine+Rx/Subject+Rx.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import RxRelay
1616
///
1717
/// - note: This only works when the underlying Failure is Swift.Error,
1818
/// since RxSwift has no typed errors.
19+
@available(OSX 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
1920
public protocol AnyObserverConvertible: Combine.Subject where Failure == Swift.Error {
2021
associatedtype Output
2122

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

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

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

0 commit comments

Comments
 (0)