Skip to content

Commit

Permalink
Removes deprecated APIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
kzaher committed Oct 19, 2016
1 parent cdb5875 commit 10f82a0
Show file tree
Hide file tree
Showing 28 changed files with 81 additions and 1,030 deletions.
1 change: 0 additions & 1 deletion .jazzy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ custom_categories:
- ScheduledDisposable
- SerialDisposable
- SingleAssignmentDisposable
- StableCompositeDisposable
- SubscriptionDisposable
- name: RxSwift/Extensions
children:
Expand Down
18 changes: 0 additions & 18 deletions Rx.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@
C8093CEC1B8A72BE0088E94D /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C5F1B8A72BE0088E94D /* SerialDisposable.swift */; };
C8093CED1B8A72BE0088E94D /* SingleAssignmentDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C601B8A72BE0088E94D /* SingleAssignmentDisposable.swift */; };
C8093CEE1B8A72BE0088E94D /* SingleAssignmentDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C601B8A72BE0088E94D /* SingleAssignmentDisposable.swift */; };
C8093CEF1B8A72BE0088E94D /* StableCompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C611B8A72BE0088E94D /* StableCompositeDisposable.swift */; };
C8093CF01B8A72BE0088E94D /* StableCompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C611B8A72BE0088E94D /* StableCompositeDisposable.swift */; };
C8093CF31B8A72BE0088E94D /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C631B8A72BE0088E94D /* Errors.swift */; };
C8093CF41B8A72BE0088E94D /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C631B8A72BE0088E94D /* Errors.swift */; };
C8093CF51B8A72BE0088E94D /* Event.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C641B8A72BE0088E94D /* Event.swift */; };
Expand Down Expand Up @@ -782,10 +780,6 @@
C89CFA2B1DAABBE20079D23B /* HotObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89CFA131DAABBE20079D23B /* HotObservable.swift */; };
C89CFA2C1DAABBE20079D23B /* HotObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89CFA131DAABBE20079D23B /* HotObservable.swift */; };
C89CFA2D1DAABBE20079D23B /* HotObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89CFA131DAABBE20079D23B /* HotObservable.swift */; };
C89CFA2E1DAABBE20079D23B /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C89CFA141DAABBE20079D23B /* Info.plist */; };
C89CFA2F1DAABBE20079D23B /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C89CFA141DAABBE20079D23B /* Info.plist */; };
C89CFA301DAABBE20079D23B /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C89CFA141DAABBE20079D23B /* Info.plist */; };
C89CFA311DAABBE20079D23B /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = C89CFA141DAABBE20079D23B /* Info.plist */; };
C89CFA321DAABBE20079D23B /* Recorded.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89CFA151DAABBE20079D23B /* Recorded.swift */; };
C89CFA331DAABBE20079D23B /* Recorded.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89CFA151DAABBE20079D23B /* Recorded.swift */; };
C89CFA341DAABBE20079D23B /* Recorded.swift in Sources */ = {isa = PBXBuildFile; fileRef = C89CFA151DAABBE20079D23B /* Recorded.swift */; };
Expand Down Expand Up @@ -886,7 +880,6 @@
C8F0BF991BBBFB8B001B112F /* SchedulerServices+Emulation.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093CBB1B8A72BE0088E94D /* SchedulerServices+Emulation.swift */; };
C8F0BF9A1BBBFB8B001B112F /* AnyObserver.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093CA01B8A72BE0088E94D /* AnyObserver.swift */; };
C8F0BF9B1BBBFB8B001B112F /* Skip.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C891B8A72BE0088E94D /* Skip.swift */; };
C8F0BF9C1BBBFB8B001B112F /* StableCompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C611B8A72BE0088E94D /* StableCompositeDisposable.swift */; };
C8F0BF9D1BBBFB8B001B112F /* Zip+arity.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C921B8A72BE0088E94D /* Zip+arity.swift */; };
C8F0BF9E1BBBFB8B001B112F /* Timer.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C911B8A72BE0088E94D /* Timer.swift */; };
C8F0BF9F1BBBFB8B001B112F /* Empty.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8C3DA051B9393AC004D233E /* Empty.swift */; };
Expand Down Expand Up @@ -1134,7 +1127,6 @@
D2EBEAF71BB9B6B2003A27DC /* ScheduledDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C5D1B8A72BE0088E94D /* ScheduledDisposable.swift */; };
D2EBEAF91BB9B6B2003A27DC /* SerialDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C5F1B8A72BE0088E94D /* SerialDisposable.swift */; };
D2EBEAFA1BB9B6B2003A27DC /* SingleAssignmentDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C601B8A72BE0088E94D /* SingleAssignmentDisposable.swift */; };
D2EBEAFB1BB9B6B2003A27DC /* StableCompositeDisposable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C611B8A72BE0088E94D /* StableCompositeDisposable.swift */; };
D2EBEAFC1BB9B6BA003A27DC /* Amb.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C6B1B8A72BE0088E94D /* Amb.swift */; };
D2EBEAFD1BB9B6BA003A27DC /* AnonymousObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8C3DA111B93A3EA004D233E /* AnonymousObservable.swift */; };
D2EBEAFF1BB9B6BA003A27DC /* Buffer.swift in Sources */ = {isa = PBXBuildFile; fileRef = C821DBA11BA4DCAB008F3809 /* Buffer.swift */; };
Expand Down Expand Up @@ -1462,7 +1454,6 @@
C8093C5D1B8A72BE0088E94D /* ScheduledDisposable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ScheduledDisposable.swift; sourceTree = "<group>"; };
C8093C5F1B8A72BE0088E94D /* SerialDisposable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SerialDisposable.swift; sourceTree = "<group>"; };
C8093C601B8A72BE0088E94D /* SingleAssignmentDisposable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SingleAssignmentDisposable.swift; sourceTree = "<group>"; };
C8093C611B8A72BE0088E94D /* StableCompositeDisposable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = StableCompositeDisposable.swift; sourceTree = "<group>"; };
C8093C631B8A72BE0088E94D /* Errors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Errors.swift; sourceTree = "<group>"; };
C8093C641B8A72BE0088E94D /* Event.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Event.swift; sourceTree = "<group>"; };
C8093C651B8A72BE0088E94D /* ImmediateSchedulerType.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ImmediateSchedulerType.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2019,7 +2010,6 @@
C8093C5D1B8A72BE0088E94D /* ScheduledDisposable.swift */,
C8093C5F1B8A72BE0088E94D /* SerialDisposable.swift */,
C8093C601B8A72BE0088E94D /* SingleAssignmentDisposable.swift */,
C8093C611B8A72BE0088E94D /* StableCompositeDisposable.swift */,
CDDEF1691D4FB40000CA8546 /* Disposables.swift */,
);
path = Disposables;
Expand Down Expand Up @@ -3356,31 +3346,27 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C89CFA2E1DAABBE20079D23B /* Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
C88FA5181C25C4B500CCFEA4 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C89CFA2F1DAABBE20079D23B /* Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
C88FA5291C25C4C000CCFEA4 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C89CFA301DAABBE20079D23B /* Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
C88FA53A1C25C4CC00CCFEA4 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
C89CFA311DAABBE20079D23B /* Info.plist in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -3896,7 +3882,6 @@
C8093D6A1B8A72BE0088E94D /* AnyObserver.swift in Sources */,
C8093D3C1B8A72BE0088E94D /* Skip.swift in Sources */,
C8B144FC1BD2D44500267DCE /* ConcurrentMainScheduler.swift in Sources */,
C8093CF01B8A72BE0088E94D /* StableCompositeDisposable.swift in Sources */,
C8FE72A11D84C3C100A1E297 /* Debunce.swift in Sources */,
D2245A1C1BD63C4600E7146F /* WithLatestFrom.swift in Sources */,
C8093D4E1B8A72BE0088E94D /* Zip+arity.swift in Sources */,
Expand Down Expand Up @@ -4120,7 +4105,6 @@
C8093D691B8A72BE0088E94D /* AnyObserver.swift in Sources */,
C8093D3B1B8A72BE0088E94D /* Skip.swift in Sources */,
C8B144FB1BD2D44500267DCE /* ConcurrentMainScheduler.swift in Sources */,
C8093CEF1B8A72BE0088E94D /* StableCompositeDisposable.swift in Sources */,
C8554E2A1C3051620052E67D /* PriorityQueue.swift in Sources */,
C8FE72A01D84C3C100A1E297 /* Debunce.swift in Sources */,
D2245A1B1BD5657300E7146F /* WithLatestFrom.swift in Sources */,
Expand Down Expand Up @@ -4270,7 +4254,6 @@
C8F0BF9A1BBBFB8B001B112F /* AnyObserver.swift in Sources */,
C8F0BF9B1BBBFB8B001B112F /* Skip.swift in Sources */,
C8B144FE1BD2D44500267DCE /* ConcurrentMainScheduler.swift in Sources */,
C8F0BF9C1BBBFB8B001B112F /* StableCompositeDisposable.swift in Sources */,
C8FE72A31D84C3C100A1E297 /* Debunce.swift in Sources */,
D2245A1E1BD63C4A00E7146F /* WithLatestFrom.swift in Sources */,
C8F0BF9D1BBBFB8B001B112F /* Zip+arity.swift in Sources */,
Expand Down Expand Up @@ -4667,7 +4650,6 @@
D2EBEB2F1BB9B6CA003A27DC /* Observable+Debug.swift in Sources */,
D2EBEAE61BB9B697003A27DC /* ObserverType.swift in Sources */,
C83D73CA1C1DBAEE003DC470 /* ScheduledItemType.swift in Sources */,
D2EBEAFB1BB9B6B2003A27DC /* StableCompositeDisposable.swift in Sources */,
D2EBEB011BB9B6BA003A27DC /* CombineLatest.swift in Sources */,
D2EBEB021BB9B6BA003A27DC /* CombineLatest+arity.swift in Sources */,
C84CC5641BDD037900E06A64 /* SynchronizedDisposeType.swift in Sources */,
Expand Down
14 changes: 0 additions & 14 deletions RxCocoa/CocoaUnits/Driver/Driver+Subscription.swift
Original file line number Diff line number Diff line change
Expand Up @@ -127,20 +127,6 @@ extension SharedSequenceConvertibleType where SharingStrategy == DriverSharingSt
MainScheduler.ensureExecutingOnScheduler(errorMessage: driverErrorMessage)
return self.asObservable().subscribe(onNext: onNext, onCompleted: onCompleted, onDisposed: onDisposed)
}

/**
Subscribes an element handler to an observable sequence.
This method can be only called from `MainThread`.
- parameter onNext: Action to invoke for each element in the observable sequence.
- returns: Subscription object used to unsubscribe from the observable sequence.
*/
// @warn_unused_result(message:"http://git.io/rxs.ud")
@available(*, deprecated, renamed: "drive(onNext:)")
public func driveNext(_ onNext: @escaping (E) -> Void) -> Disposable {
MainScheduler.ensureExecutingOnScheduler(errorMessage: driverErrorMessage)
return self.asObservable().subscribe(onNext: onNext)
}
}


132 changes: 3 additions & 129 deletions RxCocoa/CocoaUnits/SharedSequence/SharedSequence+Operators.swift
Original file line number Diff line number Diff line change
Expand Up @@ -110,84 +110,22 @@ extension SharedSequenceConvertibleType {
}
}

// MARK: doOn
// MARK: do
extension SharedSequenceConvertibleType {

/**
Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence.
- parameter eventHandler: Action to invoke for each event in the observable sequence.
- returns: The source sequence with the side-effecting behavior applied.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@available(*, deprecated, renamed: "do(onNext:onError:onCompleted:)")
public func doOn(_ eventHandler: @escaping (Event<E>) -> Void)
-> SharedSequence<SharingStrategy, E> {
let source = self.asObservable()
.doOn(eventHandler)

return SharedSequence(source)
}

/**
Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence.
- parameter onNext: Action to invoke for each element in the observable sequence.
- parameter onError: Action to invoke upon errored termination of the observable sequence. This callback will never be invoked since driver can't error out.
- parameter onCompleted: Action to invoke upon graceful termination of the observable sequence.
- returns: The source sequence with the side-effecting behavior applied.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@available(*, deprecated, renamed: "do(onNext:onError:onCompleted:)")
public func doOn(onNext: ((E) -> Void)? = nil, onError: ((Swift.Error) -> Void)? = nil, onCompleted: (() -> Void)? = nil)
-> SharedSequence<SharingStrategy, E> {
let source = self.asObservable()
.doOn(onNext: onNext, onError: onError, onCompleted: onCompleted)

return SharedSequence(source)
}

/**
Invokes an action for each Next event in the observable sequence, and propagates all observer messages through the result sequence.
- parameter onNext: Action to invoke for each element in the observable sequence.
- returns: The source sequence with the side-effecting behavior applied.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@available(*, deprecated, renamed: "do(onNext:)")
public func doOnNext(_ onNext: @escaping (E) -> Void)
-> SharedSequence<SharingStrategy, E> {
return self.do(onNext: onNext)
}

/**
Invokes an action for the Completed event in the observable sequence, and propagates all observer messages through the result sequence.
- parameter onCompleted: Action to invoke upon graceful termination of the observable sequence.
- returns: The source sequence with the side-effecting behavior applied.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@available(*, deprecated, renamed: "do(onCompleted:)")
public func doOnCompleted(_ onCompleted: @escaping () -> Void)
-> SharedSequence<SharingStrategy, E> {
return self.do(onCompleted: onCompleted)
}

/**
Invokes an action for each event in the observable sequence, and propagates all observer messages through the result sequence.
- parameter onNext: Action to invoke for each element in the observable sequence.
- parameter onError: Action to invoke upon errored termination of the observable sequence. This callback will never be invoked since driver can't error out.
- parameter onCompleted: Action to invoke upon graceful termination of the observable sequence.
- parameter onSubscribe: Action to invoke before subscribing to source observable sequence.
- parameter onDispose: Action to invoke after subscription to source observable has been disposed for any reason. It can be either because sequence terminates for some reason or observer subscription being disposed.
- returns: The source sequence with the side-effecting behavior applied.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
public func `do`(onNext: ((E) -> Void)? = nil, onError: ((Swift.Error) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onSubscribe: (() -> ())? = nil, onDispose: (() -> ())? = nil)
public func `do`(onNext: ((E) -> Void)? = nil, onCompleted: (() -> Void)? = nil, onSubscribe: (() -> ())? = nil, onDispose: (() -> ())? = nil)
-> SharedSequence<SharingStrategy, E> {
let source = self.asObservable()
.do(onNext: onNext, onError: onError, onCompleted: onCompleted, onSubscribe: onSubscribe, onDispose: onDispose)
.do(onNext: onNext, onCompleted: onCompleted, onSubscribe: onSubscribe, onDispose: onDispose)

return SharedSequence(source)
}
Expand Down Expand Up @@ -409,38 +347,6 @@ extension SharedSequence {
}
}

extension Sequence where Iterator.Element : SharedSequenceConvertibleType {

/**
Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully.
- returns: An observable sequence that contains the elements of each given sequence, in sequential order.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@available(*, deprecated, renamed: "SharingSequence.concat()")
public func concat()
-> SharedSequence<Iterator.Element.SharingStrategy, Iterator.Element.E> {
let source = self.lazy.map { $0.asSharedSequence().asObservable() }.concat()
return SharedSequence<Iterator.Element.SharingStrategy, Iterator.Element.E>(source)
}
}

extension Collection where Iterator.Element : SharedSequenceConvertibleType {

/**
Concatenates all observable sequences in the given sequence, as long as the previous observable sequence terminated successfully.
- returns: An observable sequence that contains the elements of each given sequence, in sequential order.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@available(*, deprecated, renamed: "SharingSequence.concat()")
public func concat()
-> SharedSequence<Iterator.Element.SharingStrategy, Iterator.Element.E> {
let source = self.map { $0.asSharedSequence().asObservable() }.concat()
return SharedSequence<Iterator.Element.SharingStrategy, Iterator.Element.E>(source)
}
}

// MARK: zip

extension SharedSequence {
Expand All @@ -457,22 +363,6 @@ extension SharedSequence {
}
}

extension Collection where Iterator.Element : SharedSequenceConvertibleType {

/**
Merges the specified observable sequences into one observable sequence by using the selector function whenever all of the observable sequences have produced an element at a corresponding index.
- parameter resultSelector: Function to invoke for each series of elements at corresponding indexes in the sources.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@available(*, deprecated, renamed: "SharedSequence.zip()")
public func zip<R>(_ resultSelector: @escaping ([Generator.Element.E]) throws -> R) -> SharedSequence<Generator.Element.SharingStrategy, R> {
let source = self.map { $0.asSharedSequence().asObservable() }.zip(resultSelector)
return SharedSequence<Generator.Element.SharingStrategy, R>(source)
}
}

// MARK: combineLatest

extension SharedSequence {
Expand All @@ -490,22 +380,6 @@ extension SharedSequence {
}
}

extension Collection where Iterator.Element : SharedSequenceConvertibleType {

/**
Merges the specified observable sequences into one observable sequence by using the selector function whenever any of the observable sequences produces an element.
- parameter resultSelector: Function to invoke whenever any of the sources produces an element.
- returns: An observable sequence containing the result of combining elements of the sources using the specified result selector function.
*/
// @warn_unused_result(message:"http://git.io/rxs.uo")
@available(*, deprecated, renamed: "SharingSequence.combineLatest()")
public func combineLatest<R>(_ resultSelector: @escaping ([Generator.Element.E]) throws -> R) -> SharedSequence<Generator.Element.SharingStrategy, R> {
let source = self.map { $0.asSharedSequence().asObservable() }.combineLatest(resultSelector)
return SharedSequence<Generator.Element.SharingStrategy, R>(source)
}
}

// MARK: withLatestFrom
extension SharedSequenceConvertibleType {

Expand Down
5 changes: 0 additions & 5 deletions RxCocoa/Common/DelegateProxy.swift
Original file line number Diff line number Diff line change
Expand Up @@ -181,11 +181,6 @@ open class DelegateProxy : _RXDelegateProxy {
}
}

@available(*, deprecated, renamed: "methodInvoked")
open func observe(_ selector: Selector) -> Observable<[Any]> {
return sentMessage(selector)
}

// proxy

open override func _sentMessage(_ selector: Selector, withArguments arguments: [Any]) {
Expand Down
Loading

0 comments on commit 10f82a0

Please sign in to comment.