From d7f3fa774be0cf467b156a9e6028925b7df70a2a Mon Sep 17 00:00:00 2001 From: Sendy Halim Date: Sun, 25 Oct 2015 19:23:35 +0700 Subject: [PATCH 01/13] Change diposeBag to disposeBag --- .../Examples/Calculator/CalculatorViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/RxExample/RxExample/Examples/Calculator/CalculatorViewController.swift b/RxExample/RxExample/Examples/Calculator/CalculatorViewController.swift index 9620320f..b094033e 100644 --- a/RxExample/RxExample/Examples/Calculator/CalculatorViewController.swift +++ b/RxExample/RxExample/Examples/Calculator/CalculatorViewController.swift @@ -67,7 +67,7 @@ class CalculatorViewController: ViewController { let CLEAR_STATE = CalState(previousNumber: nil, action: .Clear, currentNumber: "0", inScreen: "0", replace: true) - let diposeBag = DisposeBag() + let disposeBag = DisposeBag() override func viewDidLoad() { let commands:[Observable] = [ @@ -122,7 +122,7 @@ class CalculatorViewController: ViewController { self?.lastSignLabel.text = "" } } - .addDisposableTo(diposeBag) + .addDisposableTo(disposeBag) } func tranformState(a: CalState, _ x: Action) -> CalState { From cc8e57a8964d89807e7ee8cd1a39ec47d1b69026 Mon Sep 17 00:00:00 2001 From: Tomi Koskinen Date: Mon, 26 Oct 2015 18:55:50 +0200 Subject: [PATCH 02/13] TakeLast operator --- Rx.xcodeproj/project.pbxproj | 10 + .../Implementations/TakeLast.swift | 61 +++++ ...Observable+StandardSequenceOperators.swift | 23 ++ ...rvable+StandardSequenceOperatorsTest.swift | 248 ++++++++++++++++++ 4 files changed, 342 insertions(+) create mode 100644 RxSwift/Observables/Implementations/TakeLast.swift diff --git a/Rx.xcodeproj/project.pbxproj b/Rx.xcodeproj/project.pbxproj index cfc86a26..1363eb84 100644 --- a/Rx.xcodeproj/project.pbxproj +++ b/Rx.xcodeproj/project.pbxproj @@ -7,6 +7,10 @@ objects = { /* Begin PBXBuildFile section */ + B1B7C3BD1BDD39DB0076934E /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B7C3BC1BDD39DB0076934E /* TakeLast.swift */; }; + B1B7C3BE1BDD39DB0076934E /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B7C3BC1BDD39DB0076934E /* TakeLast.swift */; }; + B1B7C3BF1BDD39DB0076934E /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B7C3BC1BDD39DB0076934E /* TakeLast.swift */; }; + B1B7C3C01BDD39DB0076934E /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B7C3BC1BDD39DB0076934E /* TakeLast.swift */; }; C8093CC51B8A72BE0088E94D /* Cancelable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C491B8A72BE0088E94D /* Cancelable.swift */; }; C8093CC61B8A72BE0088E94D /* Cancelable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C491B8A72BE0088E94D /* Cancelable.swift */; }; C8093CC71B8A72BE0088E94D /* AsyncLock.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8093C4B1B8A72BE0088E94D /* AsyncLock.swift */; }; @@ -782,6 +786,7 @@ /* Begin PBXFileReference section */ A111CE961B91C97C00D0DCEE /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + B1B7C3BC1BDD39DB0076934E /* TakeLast.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TakeLast.swift; sourceTree = ""; }; C809396D1B8A71760088E94D /* RxCocoa.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxCocoa.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C80939E71B8A71840088E94D /* RxCocoa.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxCocoa.framework; sourceTree = BUILT_PRODUCTS_DIR; }; C8093BC71B8A71F00088E94D /* RxBlocking.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = RxBlocking.framework; sourceTree = BUILT_PRODUCTS_DIR; }; @@ -1215,6 +1220,7 @@ C8093C8B1B8A72BE0088E94D /* SubscribeOn.swift */, C8093C8C1B8A72BE0088E94D /* Switch.swift */, C8093C8D1B8A72BE0088E94D /* Take.swift */, + B1B7C3BC1BDD39DB0076934E /* TakeLast.swift */, C8093C8E1B8A72BE0088E94D /* TakeUntil.swift */, C8093C8F1B8A72BE0088E94D /* TakeWhile.swift */, C8093C901B8A72BE0088E94D /* Throttle.swift */, @@ -2138,6 +2144,7 @@ C8093D1A1B8A72BE0088E94D /* DistinctUntilChanged.swift in Sources */, C8093D561B8A72BE0088E94D /* Observable+Binding.swift in Sources */, C8093D7A1B8A72BE0088E94D /* TailRecursiveSink.swift in Sources */, + B1B7C3BE1BDD39DB0076934E /* TakeLast.swift in Sources */, C8093CC81B8A72BE0088E94D /* AsyncLock.swift in Sources */, C8093CD81B8A72BE0088E94D /* BinaryDisposable.swift in Sources */, C89CDB371BCB0DD7002063D9 /* ShareReplay1.swift in Sources */, @@ -2259,6 +2266,7 @@ C8093D191B8A72BE0088E94D /* DistinctUntilChanged.swift in Sources */, C8093D551B8A72BE0088E94D /* Observable+Binding.swift in Sources */, C8093D791B8A72BE0088E94D /* TailRecursiveSink.swift in Sources */, + B1B7C3BD1BDD39DB0076934E /* TakeLast.swift in Sources */, C8093CC71B8A72BE0088E94D /* AsyncLock.swift in Sources */, C8093CD71B8A72BE0088E94D /* BinaryDisposable.swift in Sources */, C89CDB361BCB0DD7002063D9 /* ShareReplay1.swift in Sources */, @@ -2380,6 +2388,7 @@ C8F0BFB21BBBFB8B001B112F /* DistinctUntilChanged.swift in Sources */, C8F0BFB31BBBFB8B001B112F /* Observable+Binding.swift in Sources */, C8F0BFB41BBBFB8B001B112F /* TailRecursiveSink.swift in Sources */, + B1B7C3C01BDD39DB0076934E /* TakeLast.swift in Sources */, C8F0BFB51BBBFB8B001B112F /* AsyncLock.swift in Sources */, C8F0BFB61BBBFB8B001B112F /* BinaryDisposable.swift in Sources */, C89CDB391BCB0DD7002063D9 /* ShareReplay1.swift in Sources */, @@ -2651,6 +2660,7 @@ D2EBEB3A1BB9B6D8003A27DC /* MainScheduler.swift in Sources */, D2EBEB101BB9B6C1003A27DC /* Just.swift in Sources */, D2EBEB181BB9B6C1003A27DC /* Range.swift in Sources */, + B1B7C3BF1BDD39DB0076934E /* TakeLast.swift in Sources */, D2EBEAE21BB9B697003A27DC /* Observable.swift in Sources */, D2EBEB091BB9B6C1003A27DC /* DistinctUntilChanged.swift in Sources */, D2EBEB2A1BB9B6C5003A27DC /* Zip+CollectionType.swift in Sources */, diff --git a/RxSwift/Observables/Implementations/TakeLast.swift b/RxSwift/Observables/Implementations/TakeLast.swift new file mode 100644 index 00000000..b7f9d5f1 --- /dev/null +++ b/RxSwift/Observables/Implementations/TakeLast.swift @@ -0,0 +1,61 @@ +// +// TakeLast.swift +// Rx +// +// Created by Tomi Koskinen on 25/10/15. +// Copyright © 2015 Krunoslav Zaher. All rights reserved. +// + +import Foundation + + +class TakeLastSink : Sink, ObserverType { + typealias Parent = TakeLast + typealias E = ElementType + + private let _parent: Parent + + private var _elements = [ElementType]() + + init(parent: Parent, observer: O, cancel: Disposable) { + _parent = parent + super.init(observer: observer, cancel: cancel) + } + + func on(event: Event) { + switch event { + case .Next(let value): + _elements.append(value) + if _elements.count > self._parent._count { + _elements.removeFirst() + } + case .Error: + observer?.on(event) + dispose() + case .Completed: + if self._elements.count > 0 { + self._elements.forEach { element in + observer?.on(.Next(element)) + } + } + observer?.on(.Completed) + dispose() + } + } +} + +class TakeLast: Producer { + private let _source: Observable + private let _count: Int + + init(source: Observable, count: Int) { + _source = source + _count = count + } + + override func run(observer: O, cancel: Disposable, setSink: (Disposable) -> Void) -> Disposable { + let sink = TakeLastSink(parent: self, observer: observer, cancel: cancel) + setSink(sink) + return _source.subscribe(sink) + } +} \ No newline at end of file diff --git a/RxSwift/Observables/Observable+StandardSequenceOperators.swift b/RxSwift/Observables/Observable+StandardSequenceOperators.swift index fadccece..f624f2c6 100644 --- a/RxSwift/Observables/Observable+StandardSequenceOperators.swift +++ b/RxSwift/Observables/Observable+StandardSequenceOperators.swift @@ -77,7 +77,30 @@ extension ObservableType { } } } + +// MARK: takeLast + +extension ObservableType { + /** + Returns a specified number of the last elements before the observable sequence completed. + + - parameter count: The number of elements to return. + - returns: An observable sequence that contains the specified number of elements from the end of the input sequence. + */ + @warn_unused_result(message="http://git.io/rxs.uo") + public func takeLast(count: Int) + -> Observable { + if count == 0 { + return empty() + } + else { + return TakeLast(source: self.asObservable(), count: count) + } + } +} + + // MARK: skip extension ObservableType { diff --git a/RxTests/RxSwiftTests/Tests/Observable+StandardSequenceOperatorsTest.swift b/RxTests/RxSwiftTests/Tests/Observable+StandardSequenceOperatorsTest.swift index ecdc305c..df635300 100644 --- a/RxTests/RxSwiftTests/Tests/Observable+StandardSequenceOperatorsTest.swift +++ b/RxTests/RxSwiftTests/Tests/Observable+StandardSequenceOperatorsTest.swift @@ -2816,6 +2816,254 @@ extension ObservableStandardSequenceOperators { } } +// MARK: takeLast + +extension ObservableStandardSequenceOperators { + func testTakeLast_Complete_Less() { + let scheduler = TestScheduler(initialClock: 0) + + let xs = scheduler.createHotObservable([ + next(70, 6), + next(150, 4), + next(210, 9), + next(230, 13), + next(270, 7), + next(280, 1), + next(300, -1), + completed(300) + ]) + + let res = scheduler.start { + xs.takeLast(7) + } + + XCTAssertEqual(res.messages, [ + next(300, 9), + next(300, 13), + next(300, 7), + next(300, 1), + next(300, -1), + completed(300) + ]) + + XCTAssertEqual(xs.subscriptions, [ + Subscription(200, 300) + ]) + } + + func testTakeLast_Complete_Same() { + let scheduler = TestScheduler(initialClock: 0) + + let xs = scheduler.createHotObservable([ + next(70, 6), + next(150, 4), + next(210, 9), + next(230, 13), + next(270, 7), + next(280, 1), + next(300, -1), + completed(310) + ]) + + let res = scheduler.start { + xs.takeLast(5) + } + + XCTAssertEqual(res.messages, [ + next(310, 9), + next(310, 13), + next(310, 7), + next(310, 1), + next(310, -1), + completed(310) + ]) + + XCTAssertEqual(xs.subscriptions, [ + Subscription(200, 310) + ]) + } + + func testTakeLast_Complete_More() { + let scheduler = TestScheduler(initialClock: 0) + + let xs = scheduler.createHotObservable([ + next(70, 6), + next(150, 4), + next(210, 9), + next(230, 13), + next(270, 7), + next(280, 1), + next(300, -1), + next(310, 3), + next(340, 8), + completed(350) + ]) + + let res = scheduler.start { + xs.takeLast(5) + } + + XCTAssertEqual(res.messages, [ + next(350, 7), + next(350, 1), + next(350, -1), + next(350, 3), + next(350, 8), + completed(350) + ]) + + XCTAssertEqual(xs.subscriptions, [ + Subscription(200, 350) + ]) + } + + func testTakeLast_Error_Less() { + let scheduler = TestScheduler(initialClock: 0) + + let xs = scheduler.createHotObservable([ + next(70, 6), + next(150, 4), + next(210, 9), + next(230, 13), + next(270, 7), + next(280, 1), + next(290, 64), + error(300, testError) + ]) + + let res = scheduler.start { + xs.takeLast(7) + } + + XCTAssertEqual(res.messages, [ + error(300, testError) + ]) + + XCTAssertEqual(xs.subscriptions, [ + Subscription(200, 300) + ]) + } + + func testTakeLast_Error_Same() { + let scheduler = TestScheduler(initialClock: 0) + + let xs = scheduler.createHotObservable([ + next(70, 6), + next(150, 4), + next(210, 9), + next(230, 13), + next(270, 7), + next(280, 1), + next(300, -1), + error(310, testError) + ]) + + let res = scheduler.start { + xs.takeLast(5) + } + + XCTAssertEqual(res.messages, [ + error(310, testError) + ]) + + XCTAssertEqual(xs.subscriptions, [ + Subscription(200, 310) + ]) + } + + func testTakeLast_Error_More() { + let scheduler = TestScheduler(initialClock: 0) + + let xs = scheduler.createHotObservable([ + next(70, 6), + next(150, 4), + next(210, 9), + next(230, 13), + next(270, 7), + next(280, 1), + next(300, -1), + next(310, 3), + next(340, 64), + error(360, testError) + ]) + + let res = scheduler.start { + xs.takeLast(5) + } + + XCTAssertEqual(res.messages, [ + error(360, testError) + ]) + + XCTAssertEqual(xs.subscriptions, [ + Subscription(200, 360) + ]) + } + + func testTakeLast_0_DefaultScheduler() { + let scheduler = TestScheduler(initialClock: 0) + + let xs = scheduler.createHotObservable([ + next(70, 6), + next(150, 4), + next(210, 9), + next(230, 13) + ]) + + let res = scheduler.start { + xs.takeLast(0) + } + + XCTAssertEqual(res.messages, [ + completed(200) + ]) + + XCTAssertEqual(xs.subscriptions, [ + ]) + } + + func testTakeLast_TakeLast1() { + let scheduler = TestScheduler(initialClock: 0) + + let xs = scheduler.createHotObservable([ + next(70, 6), + next(150, 4), + next(210, 9), + next(230, 13), + next(270, 7), + next(280, 1), + next(300, -1), + next(310, 3), + next(340, 8), + next(370, 11), + completed(400) + ]) + + let res = scheduler.start { + xs.takeLast(3) + } + + XCTAssertEqual(res.messages, [ + next(400, 3), + next(400, 8), + next(400, 11), + completed(400) + ]) + + XCTAssertEqual(xs.subscriptions, [ + Subscription(200, 400) + ]) + } + + func testTakeLast_DecrementCountsFirst() { + let k = BehaviorSubject(value: false) + + _ = k.takeLast(1).subscribeNext { n in + k.on(.Next(!n)) + } + } +} + // MARK: skip extension ObservableStandardSequenceOperators { func testSkip_Complete_After() { From 3e7345df04cfa45bcd5e9ccab7b28abd252ae262 Mon Sep 17 00:00:00 2001 From: Tomi Koskinen Date: Tue, 27 Oct 2015 21:40:26 +0200 Subject: [PATCH 03/13] TakeLast review fixes --- RxExample/RxExample.xcodeproj/project.pbxproj | 4 ++++ .../Observables/Implementations/TakeLast.swift | 16 +++++++++------- .../Observable+StandardSequenceOperators.swift | 15 ++++++--------- ...bservable+StandardSequenceOperatorsTest.swift | 2 +- 4 files changed, 20 insertions(+), 17 deletions(-) diff --git a/RxExample/RxExample.xcodeproj/project.pbxproj b/RxExample/RxExample.xcodeproj/project.pbxproj index 70f3c369..75817321 100644 --- a/RxExample/RxExample.xcodeproj/project.pbxproj +++ b/RxExample/RxExample.xcodeproj/project.pbxproj @@ -17,6 +17,7 @@ 07E300071B14995F00F00100 /* TableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07E300061B14995F00F00100 /* TableViewController.swift */; }; 07E300091B149A2A00F00100 /* User.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07E300081B149A2A00F00100 /* User.swift */; }; 07E3C2331B03605B0010338D /* Dependencies.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07E3C2321B03605B0010338D /* Dependencies.swift */; }; + B1B7C3D01BE006870076934E /* TakeLast.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1B7C3CF1BE006870076934E /* TakeLast.swift */; }; C803973A1BD3E17D009D8B26 /* ActivityIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = C80397391BD3E17D009D8B26 /* ActivityIndicator.swift */; }; C803973B1BD3E17D009D8B26 /* ActivityIndicator.swift in Sources */ = {isa = PBXBuildFile; fileRef = C80397391BD3E17D009D8B26 /* ActivityIndicator.swift */; }; C80397491BD3E9A6009D8B26 /* GitHubSearchRepositoriesAPI.swift in Sources */ = {isa = PBXBuildFile; fileRef = C80397481BD3E9A6009D8B26 /* GitHubSearchRepositoriesAPI.swift */; }; @@ -451,6 +452,7 @@ 07E300061B14995F00F00100 /* TableViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = TableViewController.swift; sourceTree = ""; }; 07E300081B149A2A00F00100 /* User.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = User.swift; sourceTree = ""; }; 07E3C2321B03605B0010338D /* Dependencies.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Dependencies.swift; path = Examples/Dependencies.swift; sourceTree = ""; }; + B1B7C3CF1BE006870076934E /* TakeLast.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TakeLast.swift; sourceTree = ""; }; C80397391BD3E17D009D8B26 /* ActivityIndicator.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ActivityIndicator.swift; sourceTree = ""; }; C80397481BD3E9A6009D8B26 /* GitHubSearchRepositoriesAPI.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GitHubSearchRepositoriesAPI.swift; sourceTree = ""; }; C80DDE7A1BCDA952006A1832 /* SkipWhile.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SkipWhile.swift; sourceTree = ""; }; @@ -1130,6 +1132,7 @@ C894646F1BC6C2B00055219D /* SubscribeOn.swift */, C89464701BC6C2B00055219D /* Switch.swift */, C89464711BC6C2B00055219D /* Take.swift */, + B1B7C3CF1BE006870076934E /* TakeLast.swift */, C89464721BC6C2B00055219D /* TakeUntil.swift */, C89464731BC6C2B00055219D /* TakeWhile.swift */, C89464741BC6C2B00055219D /* Throttle.swift */, @@ -1661,6 +1664,7 @@ C89464BB1BC6C2B00055219D /* AnonymousObservable.swift in Sources */, C89465991BC6C2BC0055219D /* UISegmentedControl+Rx.swift in Sources */, C8297E371B6CF905000589EA /* RxCollectionViewSectionedDataSource.swift in Sources */, + B1B7C3D01BE006870076934E /* TakeLast.swift in Sources */, C89464CD1BC6C2B00055219D /* FlatMap.swift in Sources */, C8297E381B6CF905000589EA /* Changeset.swift in Sources */, C8297E391B6CF905000589EA /* CollectionViewImageCell.swift in Sources */, diff --git a/RxSwift/Observables/Implementations/TakeLast.swift b/RxSwift/Observables/Implementations/TakeLast.swift index b7f9d5f1..842d9c49 100644 --- a/RxSwift/Observables/Implementations/TakeLast.swift +++ b/RxSwift/Observables/Implementations/TakeLast.swift @@ -15,28 +15,27 @@ class TakeLastSink : Sink private let _parent: Parent - private var _elements = [ElementType]() + private var _elements: Queue init(parent: Parent, observer: O, cancel: Disposable) { _parent = parent + _elements = Queue(capacity: parent._count) super.init(observer: observer, cancel: cancel) } func on(event: Event) { switch event { case .Next(let value): - _elements.append(value) + _elements.enqueue(value) if _elements.count > self._parent._count { - _elements.removeFirst() + _elements.dequeue() } case .Error: observer?.on(event) dispose() case .Completed: - if self._elements.count > 0 { - self._elements.forEach { element in - observer?.on(.Next(element)) - } + for e in _elements { + observer?.on(.Next(e)) } observer?.on(.Completed) dispose() @@ -49,6 +48,9 @@ class TakeLast: Producer { private let _count: Int init(source: Observable, count: Int) { + if count < 0 { + rxFatalError("count can't be negative") + } _source = source _count = count } diff --git a/RxSwift/Observables/Observable+StandardSequenceOperators.swift b/RxSwift/Observables/Observable+StandardSequenceOperators.swift index f624f2c6..5278c3de 100644 --- a/RxSwift/Observables/Observable+StandardSequenceOperators.swift +++ b/RxSwift/Observables/Observable+StandardSequenceOperators.swift @@ -83,20 +83,17 @@ extension ObservableType { extension ObservableType { /** - Returns a specified number of the last elements before the observable sequence completed. + Returns a specified number of contiguous elements from the end of an observable sequence. - - parameter count: The number of elements to return. - - returns: An observable sequence that contains the specified number of elements from the end of the input sequence. + This operator accumulates a buffer with a length enough to store elements count elements. Upon completion of the source sequence, this buffer is drained on the result sequence. This causes the elements to be delayed. + + - parameter count: Number of elements to take from the end of the source sequence. + - returns: An observable sequence containing the specified number of elements from the end of the source sequence. */ @warn_unused_result(message="http://git.io/rxs.uo") public func takeLast(count: Int) -> Observable { - if count == 0 { - return empty() - } - else { - return TakeLast(source: self.asObservable(), count: count) - } + return TakeLast(source: self.asObservable(), count: count) } } diff --git a/RxTests/RxSwiftTests/Tests/Observable+StandardSequenceOperatorsTest.swift b/RxTests/RxSwiftTests/Tests/Observable+StandardSequenceOperatorsTest.swift index df635300..5015bac7 100644 --- a/RxTests/RxSwiftTests/Tests/Observable+StandardSequenceOperatorsTest.swift +++ b/RxTests/RxSwiftTests/Tests/Observable+StandardSequenceOperatorsTest.swift @@ -3015,10 +3015,10 @@ extension ObservableStandardSequenceOperators { } XCTAssertEqual(res.messages, [ - completed(200) ]) XCTAssertEqual(xs.subscriptions, [ + Subscription(200, 1000) ]) } From a639b462315302b5c6a3db7a8e138f81fc530cc4 Mon Sep 17 00:00:00 2001 From: Tomi Koskinen Date: Tue, 27 Oct 2015 21:30:33 +0200 Subject: [PATCH 04/13] TakeCount count boundary check --- RxSwift/Observables/Implementations/Take.swift | 3 +++ 1 file changed, 3 insertions(+) diff --git a/RxSwift/Observables/Implementations/Take.swift b/RxSwift/Observables/Implementations/Take.swift index 1f4dc72e..9208e618 100644 --- a/RxSwift/Observables/Implementations/Take.swift +++ b/RxSwift/Observables/Implementations/Take.swift @@ -54,6 +54,9 @@ class TakeCount: Producer { private let _count: Int init(source: Observable, count: Int) { + if count < 0 { + rxFatalError("count can't be negative") + } _source = source _count = count } From 5adacc4092e4f4dae9b43d7eb91244bc858bf70b Mon Sep 17 00:00:00 2001 From: Sergey Timoshin Date: Wed, 28 Oct 2015 00:02:13 +0300 Subject: [PATCH 05/13] Typo fix --- Documentation/GettingStarted.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/GettingStarted.md b/Documentation/GettingStarted.md index 71427a0f..74b5d768 100644 --- a/Documentation/GettingStarted.md +++ b/Documentation/GettingStarted.md @@ -304,7 +304,7 @@ Let's create a function which creates a sequence that returns one element upon s func myJust(element: E) -> Observable { return create { observer in observer.on(.Next(element)) - obsever.on(.Completed) + observer.on(.Completed) return NopDisposable.instance } } From 51d138a17728b95f99ac50ce1db548de4a384a41 Mon Sep 17 00:00:00 2001 From: Krunoslav Zaher Date: Tue, 27 Oct 2015 22:14:37 +0100 Subject: [PATCH 06/13] Increases capacity to correct value on `TakeLast`. --- RxSwift/Observables/Implementations/TakeLast.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RxSwift/Observables/Implementations/TakeLast.swift b/RxSwift/Observables/Implementations/TakeLast.swift index 842d9c49..34edb8a2 100644 --- a/RxSwift/Observables/Implementations/TakeLast.swift +++ b/RxSwift/Observables/Implementations/TakeLast.swift @@ -19,7 +19,7 @@ class TakeLastSink : Sink init(parent: Parent, observer: O, cancel: Disposable) { _parent = parent - _elements = Queue(capacity: parent._count) + _elements = Queue(capacity: parent._count + 1) super.init(observer: observer, cancel: cancel) } From 3be67a317d67bfbcab3acb9f19dabcd242b9ea32 Mon Sep 17 00:00:00 2001 From: Tomi Koskinen Date: Wed, 28 Oct 2015 07:14:46 +0200 Subject: [PATCH 07/13] improve api documentation --- Documentation/API.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/API.md b/Documentation/API.md index e0549f25..04a15b94 100644 --- a/Documentation/API.md +++ b/Documentation/API.md @@ -21,6 +21,8 @@ Operators are stateless by default. * [`never`](http://reactivex.io/documentation/operators/empty-never-throw.html) * [`returnElement` / `just`](http://reactivex.io/documentation/operators/just.html) * [`returnElements`](http://reactivex.io/documentation/operators/from.html) + * [`range`](http://reactivex.io/documentation/operators/range.html) + * [`repeatElement`](http://reactivex.io/documentation/operators/repeat.html) * [`timer`](http://reactivex.io/documentation/operators/timer.html) #### Transforming Observables @@ -32,10 +34,12 @@ Operators are stateless by default. #### Filtering Observables * [`debounce` / `throttle`](http://reactivex.io/documentation/operators/debounce.html) * [`distinctUntilChanged`](http://reactivex.io/documentation/operators/distinct.html) + * [`ElementAt`](http://reactivex.io/documentation/operators/elementat.html) * [`filter` / `where`](http://reactivex.io/documentation/operators/filter.html) * [`sample`](http://reactivex.io/documentation/operators/sample.html) * [`skip`](http://reactivex.io/documentation/operators/skip.html) * [`take`](http://reactivex.io/documentation/operators/take.html) + * [`takeLast`](http://reactivex.io/documentation/operators/takelast.html) #### Combining Observables @@ -57,11 +61,13 @@ Operators are stateless by default. * [`observeOn` / `observeSingleOn`](http://reactivex.io/documentation/operators/observeon.html) * [`subscribe`](http://reactivex.io/documentation/operators/subscribe.html) * [`subscribeOn`](http://reactivex.io/documentation/operators/subscribeon.html) + * [`using`](http://reactivex.io/documentation/operators/using.html) * debug #### Conditional and Boolean Operators * [`amb`](http://reactivex.io/documentation/operators/amb.html) * [`skipWhile`](http://reactivex.io/documentation/operators/skipwhile.html) + * [`skipUntil`](http://reactivex.io/documentation/operators/skipuntil.html) * [`takeUntil`](http://reactivex.io/documentation/operators/takeuntil.html) * [`takeWhile`](http://reactivex.io/documentation/operators/takewhile.html) @@ -69,6 +75,7 @@ Operators are stateless by default. * [`concat`](http://reactivex.io/documentation/operators/concat.html) * [`reduce` / `aggregate`](http://reactivex.io/documentation/operators/reduce.html) + * [`toArray`](http://reactivex.io/documentation/operators/to.html) #### Connectable Observable Operators From af31d2155f373bf1f6cc6f09ad8f2217f11f8dfc Mon Sep 17 00:00:00 2001 From: yury Date: Thu, 29 Oct 2015 01:58:11 +0300 Subject: [PATCH 08/13] Run playgrounds in pre-release-tests.sh --- .../Contents.swift | 3 +-- Rx.playground/Sources/SupportCode.swift | 17 ++++++++++++++++- scripts/playgrounds.sh | 16 ++++++++++++++++ scripts/pre-release-tests.sh | 4 ++++ 4 files changed, 37 insertions(+), 3 deletions(-) create mode 100755 scripts/playgrounds.sh diff --git a/Rx.playground/Pages/Connectable_Observable_Operators.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Connectable_Observable_Operators.xcplaygroundpage/Contents.swift index 01c41486..6d965bb3 100644 --- a/Rx.playground/Pages/Connectable_Observable_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Connectable_Observable_Operators.xcplaygroundpage/Contents.swift @@ -1,7 +1,6 @@ //: [<< Previous](@previous) - [Index](Index) import RxSwift -import XCPlayground /*: ## Connectable Observable Operators @@ -200,6 +199,6 @@ func sampleWithPublish() { // sampleWithPublish() -XCPSetExecutionShouldContinueIndefinitely(true) +playgroundShouldContinueIndefinitely() //: [Index](Index) diff --git a/Rx.playground/Sources/SupportCode.swift b/Rx.playground/Sources/SupportCode.swift index f609a0b9..0228d59e 100644 --- a/Rx.playground/Sources/SupportCode.swift +++ b/Rx.playground/Sources/SupportCode.swift @@ -13,4 +13,19 @@ public func delay(delay:Double, closure:()->()) { Int64(delay * Double(NSEC_PER_SEC)) ), dispatch_get_main_queue(), closure) -} \ No newline at end of file +} + +#if NOT_IN_PLAYGROUND + +public func playgroundShouldContinueIndefinitely() { +} + +#else + +import XCPlayground + +public func playgroundShouldContinueIndefinitely() { + XCPSetExecutionShouldContinueIndefinitely(true) +} + +#endif diff --git a/scripts/playgrounds.sh b/scripts/playgrounds.sh new file mode 100755 index 00000000..cbcb5615 --- /dev/null +++ b/scripts/playgrounds.sh @@ -0,0 +1,16 @@ +. scripts/common.sh + +CONFIGURATIONS=(Release) + +# make sure osx builds +for scheme in "RxSwift-OSX" +do + for configuration in ${CONFIGURATIONS[@]} + do + PAGES_PATH=${BUILD_DIRECTORY}/Build/Products/${configuration}/all-playground-pages.swift + rx ${scheme} ${configuration} "" build + cat Rx.playground/Sources/*.swift Rx.playground/Pages/**/*.swift > ${PAGES_PATH} + swift -v -D NOT_IN_PLAYGROUND -F ${BUILD_DIRECTORY}/Build/Products/${configuration} ${PAGES_PATH} + done +done + diff --git a/scripts/pre-release-tests.sh b/scripts/pre-release-tests.sh index 0227a968..d8ae809f 100755 --- a/scripts/pre-release-tests.sh +++ b/scripts/pre-release-tests.sh @@ -113,6 +113,10 @@ do done done +# compile and run playgrounds + +. scripts/playgrounds.sh + if [ "${RELEASE_TEST}" -eq 1 ]; then mdast -u mdast-slug -u mdast-validate-links ./*.md mdast -u mdast-slug -u mdast-validate-links ./**/*.md From fc9c5645870acb62f1430b7b778c9a91a70db9b3 Mon Sep 17 00:00:00 2001 From: yury Date: Thu, 29 Oct 2015 13:45:19 +0300 Subject: [PATCH 09/13] Build should failed --- .../Pages/Combining_Observables.xcplaygroundpage/Contents.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift index ea0ef648..0d820021 100644 --- a/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift @@ -67,7 +67,7 @@ example("combineLatest 1") { example("combineLatest 2") { let intOb1 = just(2) let intOb2 = sequenceOf(0, 1, 2, 3, 4) - + build should failed combineLatest(intOb1, intOb2) { $0 * $1 } From cfa3ff051c1a618701795c0df01f326abdf1e4d1 Mon Sep 17 00:00:00 2001 From: yury Date: Thu, 29 Oct 2015 14:16:59 +0300 Subject: [PATCH 10/13] Revert "Build should failed" This reverts commit fc9c5645870acb62f1430b7b778c9a91a70db9b3. --- .../Pages/Combining_Observables.xcplaygroundpage/Contents.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift index 0d820021..ea0ef648 100644 --- a/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift @@ -67,7 +67,7 @@ example("combineLatest 1") { example("combineLatest 2") { let intOb1 = just(2) let intOb2 = sequenceOf(0, 1, 2, 3, 4) - build should failed + combineLatest(intOb1, intOb2) { $0 * $1 } From 0995a7e97945b77a73b0bcf446ef0b763cb1d35a Mon Sep 17 00:00:00 2001 From: yury Date: Thu, 29 Oct 2015 14:27:31 +0300 Subject: [PATCH 11/13] Remove warnings in playground --- .../Contents.swift | 16 +++++----- .../Contents.swift | 4 +-- .../Contents.swift | 30 +++++++++---------- .../Contents.swift | 6 ++-- .../Contents.swift | 4 +-- .../Contents.swift | 2 +- .../Contents.swift | 10 +++---- .../Subjects.xcplaygroundpage/Contents.swift | 2 +- .../Contents.swift | 6 ++-- 9 files changed, 40 insertions(+), 40 deletions(-) diff --git a/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift index ea0ef648..5ae6ce57 100644 --- a/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Combining_Observables.xcplaygroundpage/Contents.swift @@ -45,7 +45,7 @@ example("combineLatest 1") { let intOb1 = PublishSubject() let intOb2 = PublishSubject() - combineLatest(intOb1, intOb2) { + _ = combineLatest(intOb1, intOb2) { "\($0) \($1)" } .subscribe { @@ -68,7 +68,7 @@ example("combineLatest 2") { let intOb1 = just(2) let intOb2 = sequenceOf(0, 1, 2, 3, 4) - combineLatest(intOb1, intOb2) { + _ = combineLatest(intOb1, intOb2) { $0 * $1 } .subscribe { @@ -85,7 +85,7 @@ example("combineLatest 3") { let intOb2 = sequenceOf(0, 1, 2, 3) let intOb3 = sequenceOf(0, 1, 2, 3, 4) - combineLatest(intOb1, intOb2, intOb3) { + _ = combineLatest(intOb1, intOb2, intOb3) { ($0 + $1) * $2 } .subscribe { @@ -108,7 +108,7 @@ example("zip 1") { let intOb1 = PublishSubject() let intOb2 = PublishSubject() - zip(intOb1, intOb2) { + _ = zip(intOb1, intOb2) { "\($0) \($1)" } .subscribe { @@ -132,7 +132,7 @@ example("zip 2") { let intOb2 = sequenceOf(0, 1, 2, 3, 4) - zip(intOb1, intOb2) { + _ = zip(intOb1, intOb2) { $0 * $1 } .subscribe { @@ -146,7 +146,7 @@ example("zip 3") { let intOb2 = sequenceOf(0, 1, 2, 3) let intOb3 = sequenceOf(0, 1, 2, 3, 4) - zip(intOb1, intOb2, intOb3) { + _ = zip(intOb1, intOb2, intOb3) { ($0 + $1) * $2 } .subscribe { @@ -170,7 +170,7 @@ example("merge 1") { let subject1 = PublishSubject() let subject2 = PublishSubject() - sequenceOf(subject1, subject2) + _ = sequenceOf(subject1, subject2) .merge() .subscribeNext { int in print(int) @@ -190,7 +190,7 @@ example("merge 2") { let subject1 = PublishSubject() let subject2 = PublishSubject() - sequenceOf(subject1, subject2) + _ = sequenceOf(subject1, subject2) .merge(maxConcurrent: 2) .subscribe { print($0) diff --git a/Rx.playground/Pages/Conditional_and_Boolean_Operators.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Conditional_and_Boolean_Operators.xcplaygroundpage/Contents.swift index 03398d0c..9da1d2ec 100644 --- a/Rx.playground/Pages/Conditional_and_Boolean_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Conditional_and_Boolean_Operators.xcplaygroundpage/Contents.swift @@ -23,7 +23,7 @@ example("takeUntil") { let originalSequence = PublishSubject() let whenThisSendsNextWorldStops = PublishSubject() - originalSequence + _ = originalSequence .takeUntil(whenThisSendsNextWorldStops) .subscribe { print($0) @@ -53,7 +53,7 @@ example("takeWhile") { let sequence = PublishSubject() - sequence + _ = sequence .takeWhile { int in int < 4 } diff --git a/Rx.playground/Pages/Connectable_Observable_Operators.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Connectable_Observable_Operators.xcplaygroundpage/Contents.swift index 6d965bb3..c366e4a2 100644 --- a/Rx.playground/Pages/Connectable_Observable_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Connectable_Observable_Operators.xcplaygroundpage/Contents.swift @@ -14,13 +14,13 @@ func sampleWithoutConnectableOperators() { let int1 = interval(1, MainScheduler.sharedInstance) - int1 + _ = int1 .subscribe { print("first subscription \($0)") } delay(5) { - int1 + _ = int1 .subscribe { print("second subscription \($0)") } @@ -43,7 +43,7 @@ func sampleWithMulticast() { let subject1 = PublishSubject() - subject1 + _ = subject1 .subscribe { print("Subject \($0)") } @@ -51,7 +51,7 @@ func sampleWithMulticast() { let int1 = interval(1, MainScheduler.sharedInstance) .multicast(subject1) - int1 + _ = int1 .subscribe { print("first subscription \($0)") } @@ -61,14 +61,14 @@ func sampleWithMulticast() { } delay(4) { - int1 + _ = int1 .subscribe { print("second subscription \($0)") } } delay(6) { - int1 + _ = int1 .subscribe { print("third subscription \($0)") } @@ -94,7 +94,7 @@ func sampleWithReplayBuffer0() { let int1 = interval(1, MainScheduler.sharedInstance) .replay(0) - int1 + _ = int1 .subscribe { print("first subscription \($0)") } @@ -104,14 +104,14 @@ func sampleWithReplayBuffer0() { } delay(4) { - int1 + _ = int1 .subscribe { print("second subscription \($0)") } } delay(6) { - int1 + _ = int1 .subscribe { print("third subscription \($0)") } @@ -129,7 +129,7 @@ func sampleWithReplayBuffer2() { let int1 = interval(1, MainScheduler.sharedInstance) .replay(2) - int1 + _ = int1 .subscribe { print("first subscription \($0)") } @@ -139,14 +139,14 @@ func sampleWithReplayBuffer2() { } delay(4) { - int1 + _ = int1 .subscribe { print("second subscription \($0)") } } delay(6) { - int1 + _ = int1 .subscribe { print("third subscription \($0)") } @@ -172,7 +172,7 @@ func sampleWithPublish() { let int1 = interval(1, MainScheduler.sharedInstance) .publish() - int1 + _ = int1 .subscribe { print("first subscription \($0)") } @@ -182,14 +182,14 @@ func sampleWithPublish() { } delay(4) { - int1 + _ = int1 .subscribe { print("second subscription \($0)") } } delay(6) { - int1 + _ = int1 .subscribe { print("third subscription \($0)") } diff --git a/Rx.playground/Pages/Error_Handling_Operators.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Error_Handling_Operators.xcplaygroundpage/Contents.swift index f6099112..59f10a58 100644 --- a/Rx.playground/Pages/Error_Handling_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Error_Handling_Operators.xcplaygroundpage/Contents.swift @@ -21,7 +21,7 @@ example("catchError 1") { let sequenceThatFails = PublishSubject() let recoverySequence = sequenceOf(100, 200, 300, 400) - sequenceThatFails + _ = sequenceThatFails .catchError { error in return recoverySequence } @@ -40,7 +40,7 @@ example("catchError 1") { example("catchError 2") { let sequenceThatFails = PublishSubject() - sequenceThatFails + _ = sequenceThatFails .catchErrorJustReturn(100) .subscribe { print($0) @@ -83,7 +83,7 @@ example("retry") { return NopDisposable.instance } - funnyLookingSequence + _ = funnyLookingSequence .retry() .subscribe { print($0) diff --git a/Rx.playground/Pages/Introduction.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Introduction.xcplaygroundpage/Contents.swift index 69908bf4..9055e826 100644 --- a/Rx.playground/Pages/Introduction.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Introduction.xcplaygroundpage/Contents.swift @@ -149,12 +149,12 @@ example("deferred") { } } - deferredSequence + _ = deferredSequence .subscribe { event in print(event) } - deferredSequence + _ = deferredSequence .subscribe { event in print(event) } diff --git a/Rx.playground/Pages/Mathematical_and_Aggregate_Operators.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Mathematical_and_Aggregate_Operators.xcplaygroundpage/Contents.swift index 64273983..8ee29c4c 100644 --- a/Rx.playground/Pages/Mathematical_and_Aggregate_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Mathematical_and_Aggregate_Operators.xcplaygroundpage/Contents.swift @@ -65,7 +65,7 @@ This function will perform a function on each element in the sequence until it i */ example("reduce") { - sequenceOf(0, 1, 2, 3, 4, 5, 6, 7, 8, 9) + _ = sequenceOf(0, 1, 2, 3, 4, 5, 6, 7, 8, 9) .reduce(0, +) .subscribe { print($0) diff --git a/Rx.playground/Pages/Observable_Utility_Operators.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Observable_Utility_Operators.xcplaygroundpage/Contents.swift index 4df8d1ad..3010400c 100644 --- a/Rx.playground/Pages/Observable_Utility_Operators.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Observable_Utility_Operators.xcplaygroundpage/Contents.swift @@ -18,7 +18,7 @@ A toolbox of useful Operators for working with Observables. example("subscribe") { let sequenceOfInts = PublishSubject() - sequenceOfInts + _ = sequenceOfInts .subscribe { print($0) } @@ -40,7 +40,7 @@ There are several variants of the `subscribe` operator. example("subscribeNext") { let sequenceOfInts = PublishSubject() - sequenceOfInts + _ = sequenceOfInts .subscribeNext { print($0) } @@ -58,7 +58,7 @@ example("subscribeNext") { example("subscribeCompleted") { let sequenceOfInts = PublishSubject() - sequenceOfInts + _ = sequenceOfInts .subscribeCompleted { print("It's completed") } @@ -76,7 +76,7 @@ example("subscribeCompleted") { example("subscribeError") { let sequenceOfInts = PublishSubject() - sequenceOfInts + _ = sequenceOfInts .subscribeError { error in print(error) } @@ -98,7 +98,7 @@ register an action to take upon a variety of Observable lifecycle events example("doOn") { let sequenceOfInts = PublishSubject() - sequenceOfInts + _ = sequenceOfInts .doOn { print("Intercepted event \($0)") } diff --git a/Rx.playground/Pages/Subjects.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Subjects.xcplaygroundpage/Contents.swift index 0a5b5753..c9f667ee 100644 --- a/Rx.playground/Pages/Subjects.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Subjects.xcplaygroundpage/Contents.swift @@ -8,7 +8,7 @@ A Subject is a sort of bridge or proxy that is available in some implementations */ func writeSequenceToConsole(name: String, sequence: O) { - sequence + _ = sequence .subscribe { e in print("Subscription: \(name), event: \(e)") } diff --git a/Rx.playground/Pages/Transforming_Observables.xcplaygroundpage/Contents.swift b/Rx.playground/Pages/Transforming_Observables.xcplaygroundpage/Contents.swift index 60ed7d24..92f02385 100644 --- a/Rx.playground/Pages/Transforming_Observables.xcplaygroundpage/Contents.swift +++ b/Rx.playground/Pages/Transforming_Observables.xcplaygroundpage/Contents.swift @@ -21,7 +21,7 @@ Transform the items emitted by an Observable by applying a function to each item example("map") { let originalSequence = sequenceOf(Character("A"), Character("B"), Character("C")) - originalSequence + _ = originalSequence .map { char in char.hashValue } @@ -43,7 +43,7 @@ example("flatMap") { let sequenceString = sequenceOf("A", "B", "C", "D", "E", "F", "--") - sequenceInt + _ = sequenceInt .flatMap { int in sequenceString } @@ -65,7 +65,7 @@ Apply a function to each item emitted by an Observable, sequentially, and emit e example("scan") { let sequenceToSum = sequenceOf(0, 1, 2, 3, 4, 5) - sequenceToSum + _ = sequenceToSum .scan(0) { acum, elem in acum + elem } From 5b380a386d9e961bde98c1a2416fef56ee910b0d Mon Sep 17 00:00:00 2001 From: Krunoslav Zaher Date: Thu, 29 Oct 2015 20:35:27 +0100 Subject: [PATCH 12/13] Fixes casing in documentation for `elementAt`. --- Documentation/API.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/API.md b/Documentation/API.md index 04a15b94..a35f98c9 100644 --- a/Documentation/API.md +++ b/Documentation/API.md @@ -34,7 +34,7 @@ Operators are stateless by default. #### Filtering Observables * [`debounce` / `throttle`](http://reactivex.io/documentation/operators/debounce.html) * [`distinctUntilChanged`](http://reactivex.io/documentation/operators/distinct.html) - * [`ElementAt`](http://reactivex.io/documentation/operators/elementat.html) + * [`elementAt`](http://reactivex.io/documentation/operators/elementat.html) * [`filter` / `where`](http://reactivex.io/documentation/operators/filter.html) * [`sample`](http://reactivex.io/documentation/operators/sample.html) * [`skip`](http://reactivex.io/documentation/operators/skip.html) @@ -441,6 +441,6 @@ extension NSTextField { public var rx_delegate: DelegateProxy {} public var rx_text: ControlProperty {} - + } ``` From a701d79a0fdfff794123493021e3d742491317c9 Mon Sep 17 00:00:00 2001 From: David Potter Date: Thu, 29 Oct 2015 15:16:56 -0700 Subject: [PATCH 13/13] Fix warnings due to use in app extensions and to Xcode updates. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Xcode gives two warnings when including the Rx project and building in an app. 1. The first is due to use in a component that will be used in an extension. Xcode displays the message “linking against dylib not safe for use in application extensions”. To configure an app extension target to use an embedded framework, set the target’s “Require Only App-Extension-Safe API” build setting to Yes. https://developer.apple.com/library/prerelease/ios/documentation/General/Conceptual/ExtensibilityPG/ExtensionScenarios.html 2. The second is due to changes in Xcode that want to update the project file to comply with the latest guidelines. Clicking the warning brings up a prompt to modify the project. --- Rx.xcodeproj/project.pbxproj | 44 ++++++++++++++++++++++++++++++++---- RxBlocking/Info.plist | 2 +- RxCocoa/Info.plist | 2 +- RxSwift/Info.plist | 2 +- 4 files changed, 43 insertions(+), 7 deletions(-) diff --git a/Rx.xcodeproj/project.pbxproj b/Rx.xcodeproj/project.pbxproj index 1363eb84..1e5b0745 100644 --- a/Rx.xcodeproj/project.pbxproj +++ b/Rx.xcodeproj/project.pbxproj @@ -1836,7 +1836,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0700; - LastUpgradeCheck = 0700; + LastUpgradeCheck = 0710; ORGANIZATIONNAME = "Krunoslav Zaher"; TargetAttributes = { C8A56AD61AD7424700B4673B = { @@ -2805,6 +2805,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxCocoa/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxCocoa; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -2821,6 +2822,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxCocoa/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxCocoa; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -2837,6 +2839,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxCocoa/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxCocoa; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -2855,6 +2858,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxCocoa/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxCocoa; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -2873,6 +2877,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxCocoa/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxCocoa; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -2891,6 +2896,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxCocoa/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxCocoa; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -2907,6 +2913,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxBlocking/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxBlocking; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -2923,6 +2930,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxBlocking/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxBlocking; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -2939,6 +2947,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxBlocking/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxBlocking; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -2957,6 +2966,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxBlocking/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxBlocking; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -2975,6 +2985,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxBlocking/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxBlocking; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -2993,6 +3004,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxBlocking/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxBlocking; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -3003,6 +3015,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -3056,6 +3069,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -3074,6 +3088,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxSwift/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxSwift; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -3092,6 +3107,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxSwift/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxSwift; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -3110,6 +3126,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxSwift/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxSwift; SDKROOT = macosx; SKIP_INSTALL = YES; @@ -3120,6 +3137,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -3173,6 +3191,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + APPLICATION_EXTENSION_API_ONLY = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; @@ -3224,6 +3243,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -3241,6 +3261,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxSwift; SDKROOT = iphoneos; SKIP_INSTALL = YES; @@ -3258,6 +3279,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxSwift; SDKROOT = watchos; SKIP_INSTALL = YES; @@ -3276,6 +3298,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxSwift; SDKROOT = watchos; SKIP_INSTALL = YES; @@ -3294,6 +3317,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxSwift; SDKROOT = watchos; SKIP_INSTALL = YES; @@ -3312,6 +3336,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxCocoa; SDKROOT = watchos; SKIP_INSTALL = YES; @@ -3330,6 +3355,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxCocoa; SDKROOT = watchos; SKIP_INSTALL = YES; @@ -3348,6 +3374,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxCocoa; SDKROOT = watchos; SKIP_INSTALL = YES; @@ -3366,6 +3393,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxBlocking; SDKROOT = watchos; SKIP_INSTALL = YES; @@ -3384,6 +3412,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxBlocking; SDKROOT = watchos; SKIP_INSTALL = YES; @@ -3402,6 +3431,7 @@ INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.2; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxBlocking; SDKROOT = watchos; SKIP_INSTALL = YES; @@ -3423,6 +3453,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxCocoa/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxCocoa; SDKROOT = appletvos; SKIP_INSTALL = YES; @@ -3441,6 +3472,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxCocoa/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxCocoa; SDKROOT = appletvos; SKIP_INSTALL = YES; @@ -3459,6 +3491,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxCocoa/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxCocoa; SDKROOT = appletvos; SKIP_INSTALL = YES; @@ -3482,7 +3515,7 @@ INFOPLIST_FILE = RxSwift/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = ""; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxSwift; SDKROOT = appletvos; SKIP_INSTALL = YES; @@ -3501,7 +3534,7 @@ INFOPLIST_FILE = RxSwift/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = ""; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxSwift; SDKROOT = appletvos; SKIP_INSTALL = YES; @@ -3520,7 +3553,7 @@ INFOPLIST_FILE = RxSwift/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - PRODUCT_BUNDLE_IDENTIFIER = ""; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxSwift; SDKROOT = appletvos; SKIP_INSTALL = YES; @@ -3539,6 +3572,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxBlocking/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxBlocking; SDKROOT = appletvos; SKIP_INSTALL = YES; @@ -3557,6 +3591,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxBlocking/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxBlocking; SDKROOT = appletvos; SKIP_INSTALL = YES; @@ -3575,6 +3610,7 @@ INFOPLIST_FILE = "$(SRCROOT)/RxBlocking/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = "Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = RxBlocking; SDKROOT = appletvos; SKIP_INSTALL = YES; diff --git a/RxBlocking/Info.plist b/RxBlocking/Info.plist index c1620d0a..d3de8eef 100644 --- a/RxBlocking/Info.plist +++ b/RxBlocking/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/RxCocoa/Info.plist b/RxCocoa/Info.plist index c1620d0a..d3de8eef 100644 --- a/RxCocoa/Info.plist +++ b/RxCocoa/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName diff --git a/RxSwift/Info.plist b/RxSwift/Info.plist index c1620d0a..d3de8eef 100644 --- a/RxSwift/Info.plist +++ b/RxSwift/Info.plist @@ -7,7 +7,7 @@ CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier - Krunoslav-Zaher.$(PRODUCT_NAME:rfc1034identifier) + $(PRODUCT_BUNDLE_IDENTIFIER) CFBundleInfoDictionaryVersion 6.0 CFBundleName