diff --git a/RxCocoa/Common/CLLocationManager+Rx.swift b/RxCocoa/Common/CLLocationManager+Rx.swift index 9adb2b57..4d6661a4 100644 --- a/RxCocoa/Common/CLLocationManager+Rx.swift +++ b/RxCocoa/Common/CLLocationManager+Rx.swift @@ -28,32 +28,36 @@ extension CLLocationManager { /** Reactive wrapper for `delegate` message. */ - public var rx_didUpdateLocations: Observable<[CLLocation]!> { + public var rx_didUpdateLocations: Observable<[CLLocation]> { return rx_delegate.observe("locationManager:didUpdateLocations:") .map { a in - return a[1] as? [CLLocation] + return try castOrThrow([CLLocation].self, a[1]) } } /** Reactive wrapper for `delegate` message. */ - public var rx_didFailWithError: Observable { + public var rx_didFailWithError: Observable { return rx_delegate.observe("locationManager:didFailWithError:") .map { a in - return a[1] as? NSError + return try castOrThrow(NSError.self, a[1]) } } + #if os(iOS) || os(watchOS) || os(OSX) /** Reactive wrapper for `delegate` message. */ - public var rx_didFinishDeferredUpdatesWithError: Observable { + public var rx_didFinishDeferredUpdatesWithError: Observable { return rx_delegate.observe("locationManager:didFinishDeferredUpdatesWithError:") .map { a in - return a[1] as? NSError + return try castOrThrow(NSError.self, a[1]) } } + #endif + + #if os(iOS) // MARK: Pausing Location Updates @@ -82,92 +86,102 @@ extension CLLocationManager { /** Reactive wrapper for `delegate` message. */ - #if os(iOS) || os(OSX) - public var rx_didUpdateHeading: Observable { + public var rx_didUpdateHeading: Observable { return rx_delegate.observe("locationManager:didUpdateHeading:") .map { a in - return a[1] as? CLHeading + return try castOrThrow(CLHeading.self, a[1]) } } - #endif // MARK: Responding to Region Events /** Reactive wrapper for `delegate` message. */ - public var rx_didEnterRegion: Observable { + public var rx_didEnterRegion: Observable { return rx_delegate.observe("locationManager:didEnterRegion:") .map { a in - return a[1] as? CLRegion + return try castOrThrow(CLRegion.self, a[1]) } } /** Reactive wrapper for `delegate` message. */ - public var rx_didExitRegion: Observable { + public var rx_didExitRegion: Observable { return rx_delegate.observe("locationManager:didExitRegion:") .map { a in - return a[1] as? CLRegion + return try castOrThrow(CLRegion.self, a[1]) } } - /** - Reactive wrapper for `delegate` message. - */ - #if os(iOS) || os(OSX) - @available(OSX 10.10, *) - public var rx_didDetermineStateForRegion: Observable<(state: CLRegionState, region: CLRegion!)> { - return rx_delegate.observe("locationManager:didDetermineState:forRegion:") - .map { a in - let stateNumber = a[1] as! NSNumber - return (state: CLRegionState(rawValue: stateNumber.integerValue) ?? CLRegionState.Unknown, region: a[2] as? CLRegion) - } - } #endif + #if os(iOS) || os(OSX) + /** Reactive wrapper for `delegate` message. */ - public var rx_monitoringDidFailForRegionWithError: Observable<(region: CLRegion!, error: NSError!)> { - return rx_delegate.observe("locationManager:monitoringDidFailForRegion:withError:") + @available(OSX 10.10, *) + public var rx_didDetermineStateForRegion: Observable<(state: CLRegionState, region: CLRegion)> { + return rx_delegate.observe("locationManager:didDetermineState:forRegion:") .map { a in - return (region: a[1] as? CLRegion, error: a[2] as? NSError) + let stateNumber = try castOrThrow(NSNumber.self, a[1]) + let state = CLRegionState(rawValue: stateNumber.integerValue) ?? CLRegionState.Unknown + let region = try castOrThrow(CLRegion.self, a[2]) + return (state: state, region: region) } } /** Reactive wrapper for `delegate` message. */ - public var rx_didStartMonitoringForRegion: Observable { - return rx_delegate.observe("locationManager:didStartMonitoringForRegion:") + public var rx_monitoringDidFailForRegionWithError: Observable<(region: CLRegion?, error: NSError)> { + return rx_delegate.observe("locationManager:monitoringDidFailForRegion:withError:") .map { a in - return a[1] as? CLRegion + let region = try castOptionalOrThrow(CLRegion.self, a[1]) + let error = try castOrThrow(NSError.self, a[2]) + return (region: region, error: error) } } + /** + Reactive wrapper for `delegate` message. + */ + public var rx_didStartMonitoringForRegion: Observable { + return rx_delegate.observe("locationManager:didStartMonitoringForRegion:") + .map { a in + return try castOrThrow(CLRegion.self, a[1]) + } + } + + #endif + + #if os(iOS) + // MARK: Responding to Ranging Events -#if os(iOS) - /** Reactive wrapper for `delegate` message. */ - public var rx_didRangeBeaconsInRegion: Observable<(beacons: [CLBeacon]!, region: CLBeaconRegion!)> { + public var rx_didRangeBeaconsInRegion: Observable<(beacons: [CLBeacon], region: CLBeaconRegion)> { return rx_delegate.observe("locationManager:didRangeBeacons:inRegion:") .map { a in - return (beacons: a[1] as? [CLBeacon], region: a[2] as? CLBeaconRegion) + let beacons = try castOrThrow([CLBeacon].self, a[1]) + let region = try castOrThrow(CLBeaconRegion.self, a[2]) + return (beacons: beacons, region: region) } } /** Reactive wrapper for `delegate` message. */ - public var rx_rangingBeaconsDidFailForRegionWithError: Observable<(region: CLBeaconRegion!, error: NSError!)> { + public var rx_rangingBeaconsDidFailForRegionWithError: Observable<(region: CLBeaconRegion, error: NSError)> { return rx_delegate.observe("locationManager:rangingBeaconsDidFailForRegion:withError:") .map { a in - return (region: a[1] as? CLBeaconRegion, error: a[2] as? NSError) + let region = try castOrThrow(CLBeaconRegion.self, a[1]) + let error = try castOrThrow(NSError.self, a[2]) + return (region: region, error: error) } } @@ -177,25 +191,25 @@ extension CLLocationManager { Reactive wrapper for `delegate` message. */ @available(iOS 8.0, *) - public var rx_didVisit: Observable { + public var rx_didVisit: Observable { return rx_delegate.observe("locationManager:didVisit:") .map { a in - return a[1] as? CLVisit + return try castOrThrow(CLVisit.self, a[1]) } } -#endif + #endif // MARK: Responding to Authorization Changes /** Reactive wrapper for `delegate` message. */ - public var rx_didChangeAuthorizationStatus: Observable { + public var rx_didChangeAuthorizationStatus: Observable { return rx_delegate.observe("locationManager:didChangeAuthorizationStatus:") .map { a in - let number = a[1] as! NSNumber - return CLAuthorizationStatus(rawValue: Int32(number.integerValue)) + let number = try castOrThrow(NSNumber.self, a[1]) + return CLAuthorizationStatus(rawValue: Int32(number.integerValue)) ?? .NotDetermined } } diff --git a/RxCocoa/Common/RxCocoa.swift b/RxCocoa/Common/RxCocoa.swift index d258b51b..caa3b339 100644 --- a/RxCocoa/Common/RxCocoa.swift +++ b/RxCocoa/Common/RxCocoa.swift @@ -40,6 +40,10 @@ public enum RxCocoaError Invalid object on key path. */ case InvalidObjectOnKeyPath(object: AnyObject, sourceObject: AnyObject, propertyName: String) + /** + Casting error. + */ + case CastingError(object: AnyObject, targetType: Any.Type) } public extension RxCocoaError { @@ -58,6 +62,8 @@ public extension RxCocoaError { return "Object `\(object)` dosn't have a property named `\(propertyName)`" case let .InvalidObjectOnKeyPath(object, sourceObject, propertyName): return "Unobservable object `\(object)` was observed as `\(propertyName)` of `\(sourceObject)`" + case .CastingError(let object, let targetType): + return "Error casting `\(object)` to `\(targetType)`" } } } @@ -80,11 +86,11 @@ func bindingErrorToVariable(error: ErrorType) { #endif } -@noreturn func rxAbstractMethodWithMessage(message: String) -> T { +@noreturn func rxAbstractMethodWithMessage(message: String) { rxFatalError(message) } -@noreturn func rxAbstractMethod() -> T { +@noreturn func rxAbstractMethod() { rxFatalError("Abstract method") } @@ -97,6 +103,26 @@ func castOptionalOrFatalError(value: AnyObject?) -> T? { return v } +func castOrThrow(resultType: T.Type, _ object: AnyObject) throws -> T { + guard let returnValue = object as? T else { + throw RxCocoaError.CastingError(object: object, targetType: resultType) + } + + return returnValue +} + +func castOptionalOrThrow(resultType: T.Type, _ object: AnyObject) throws -> T? { + if NSNull().isEqual(object) { + return nil + } + + guard let returnValue = object as? T else { + throw RxCocoaError.CastingError(object: object, targetType: resultType) + } + + return returnValue +} + func castOrFatalError(value: AnyObject!, message: String) -> T { let maybeResult: T? = value as? T guard let result = maybeResult else { diff --git a/RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift b/RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift index ba7c5579..98c739c0 100644 --- a/RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift +++ b/RxCocoa/iOS/DataSources/RxCollectionViewReactiveArrayDataSource.swift @@ -30,7 +30,7 @@ class _RxCollectionViewReactiveArrayDataSource: NSObject, UICollectionViewDataSo } func _collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { - return rxAbstractMethod() + rxAbstractMethod() } func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { diff --git a/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift b/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift index 43f199fb..2003d4de 100644 --- a/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift +++ b/RxCocoa/iOS/DataSources/RxTableViewReactiveArrayDataSource.swift @@ -30,7 +30,7 @@ class _RxTableViewReactiveArrayDataSource: NSObject, UITableViewDataSource { } func _tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - return rxAbstractMethod() + rxAbstractMethod() } func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { diff --git a/RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift b/RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift index 0a9af858..8b0e44c2 100644 --- a/RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift +++ b/RxCocoa/iOS/Proxies/RxCollectionViewDataSourceProxy.swift @@ -20,12 +20,12 @@ class CollectionViewDataSourceNotSet : NSObject , UICollectionViewDataSource { func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int { - return rxAbstractMethodWithMessage(dataSourceNotSet) + rxAbstractMethodWithMessage(dataSourceNotSet) } // The cell that is returned must be retrieved from a call to -dequeueReusableCellWithReuseIdentifier:forIndexPath: func collectionView(collectionView: UICollectionView, cellForItemAtIndexPath indexPath: NSIndexPath) -> UICollectionViewCell { - return rxAbstractMethodWithMessage(dataSourceNotSet) + rxAbstractMethodWithMessage(dataSourceNotSet) } } diff --git a/RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift b/RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift index e65563d3..8e63c68a 100644 --- a/RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift +++ b/RxCocoa/iOS/Proxies/RxTableViewDataSourceProxy.swift @@ -20,15 +20,15 @@ class TableViewDataSourceNotSet : NSObject , UITableViewDataSource { func numberOfSectionsInTableView(tableView: UITableView) -> Int { - return rxAbstractMethodWithMessage(dataSourceNotSet) + rxAbstractMethodWithMessage(dataSourceNotSet) } func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int { - return rxAbstractMethodWithMessage(dataSourceNotSet) + rxAbstractMethodWithMessage(dataSourceNotSet) } func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { - return rxAbstractMethodWithMessage(dataSourceNotSet) + rxAbstractMethodWithMessage(dataSourceNotSet) } } diff --git a/RxExample/RxExample/Images.xcassets/AppIcon.appiconset/Contents.json b/RxExample/RxExample/Images.xcassets/AppIcon.appiconset/Contents.json index 0342a564..6d9564a0 100644 --- a/RxExample/RxExample/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/RxExample/RxExample/Images.xcassets/AppIcon.appiconset/Contents.json @@ -105,6 +105,11 @@ "filename" : "Icon-76@2x.png", "scale" : "2x" }, + { + "idiom" : "ipad", + "size" : "83.5x83.5", + "scale" : "2x" + }, { "size" : "24x24", "idiom" : "watch", diff --git a/RxTests/RxCocoaTests/CLLocationManager+RxTests.swift b/RxTests/RxCocoaTests/CLLocationManager+RxTests.swift new file mode 100644 index 00000000..04943eb9 --- /dev/null +++ b/RxTests/RxCocoaTests/CLLocationManager+RxTests.swift @@ -0,0 +1,403 @@ +// +// CLLocationManager+RxTests.swift +// RxTests +// +// Created by Krunoslav Zaher on 12/13/15. +// +// + +import Foundation +import RxSwift +import RxCocoa +import XCTest +import CoreLocation + +class CLLocationManagerTests : RxTest { + +} + +// delegate methods + +extension CLLocationManagerTests { + func testDidUpdateLocations() { + var completed = false + var location: CLLocation? + + let targetLocation = CLLocation(latitude: 90, longitude: 180) + + autoreleasepool { + let manager = CLLocationManager() + + _ = manager.rx_didUpdateLocations.subscribe(onNext: { l in + location = l[0] + }, onCompleted: { + completed = true + }) + + manager.delegate!.locationManager!(manager, didUpdateLocations: [targetLocation]) + } + + XCTAssertEqual(location?.coordinate.latitude, targetLocation.coordinate.latitude) + XCTAssertEqual(location?.coordinate.longitude, targetLocation.coordinate.longitude) + XCTAssertTrue(completed) + } + + func testDidFailWithError() { + var completed = false + var error: NSError? + + autoreleasepool { + let manager = CLLocationManager() + + _ = manager.rx_didFailWithError.subscribe(onNext: { e in + error = e + }, onCompleted: { + completed = true + }) + + manager.delegate!.locationManager!(manager, didFailWithError: testError) + } + + XCTAssertEqual(error, testError) + XCTAssertTrue(completed) + } + + #if os(iOS) || os(OSX) + + func testDidFinishDeferredUpdatesWithError() { + var completed = false + var error: NSError? + + autoreleasepool { + let manager = CLLocationManager() + + _ = manager.rx_didFinishDeferredUpdatesWithError.subscribe(onNext: { e in + error = e + }, onCompleted: { + completed = true + }) + + manager.delegate!.locationManager!(manager, didFinishDeferredUpdatesWithError: testError) + } + + XCTAssertEqual(error, testError) + XCTAssertTrue(completed) + } + + #endif + + #if os(iOS) + + func testDidPauseLocationUpdates() { + var completed = false + var updates: ()? + + autoreleasepool { + let manager = CLLocationManager() + + _ = manager.rx_didPauseLocationUpdates.subscribe(onNext: { u in + updates = u + }, onCompleted: { + completed = true + }) + + manager.delegate!.locationManagerDidPauseLocationUpdates!(manager) + } + + XCTAssertTrue(updates != nil) + XCTAssertTrue(completed) + } + + func testDidResumeLocationUpdates() { + var completed = false + var updates: ()? + + autoreleasepool { + let manager = CLLocationManager() + + _ = manager.rx_didResumeLocationUpdates.subscribe(onNext: { _ in + updates = () + }, onCompleted: { + completed = true + }) + + manager.delegate!.locationManagerDidResumeLocationUpdates!(manager) + } + + XCTAssertTrue(updates != nil) + XCTAssertTrue(completed) + } + + func testDidUpdateHeading() { + var completed = false + var heading: CLHeading? + + let targetHeading = CLHeading() + + autoreleasepool { + let manager = CLLocationManager() + + _ = manager.rx_didUpdateHeading.subscribe(onNext: { n in + heading = n + }, onCompleted: { + completed = true + }) + + manager.delegate!.locationManager!(manager, didUpdateHeading: targetHeading) + } + + XCTAssertEqual(heading, targetHeading) + XCTAssertTrue(completed) + } + + func testDidEnterRegion() { + var completed = false + var value: CLRegion? + + let targetValue = CLCircularRegion(center: CLLocationCoordinate2D(latitude: 90, longitude: 180), radius: 10, identifier: "unit tests in cloud") + + autoreleasepool { + let manager = CLLocationManager() + + _ = manager.rx_didEnterRegion.subscribe(onNext: { n in + value = n + }, onCompleted: { + completed = true + }) + + manager.delegate!.locationManager!(manager, didEnterRegion: targetValue) + } + + XCTAssertEqual(value, targetValue) + XCTAssertTrue(completed) + } + + func testDidExitRegion() { + var completed = false + var value: CLRegion? + + let targetValue = CLCircularRegion(center: CLLocationCoordinate2D(latitude: 90, longitude: 180), radius: 10, identifier: "unit tests in cloud") + + autoreleasepool { + let manager = CLLocationManager() + + _ = manager.rx_didExitRegion.subscribe(onNext: { n in + value = n + }, onCompleted: { + completed = true + }) + + manager.delegate!.locationManager!(manager, didExitRegion: targetValue) + } + + XCTAssertEqual(value, targetValue) + XCTAssertTrue(completed) + } + + #endif + + #if os(iOS) || os(OSX) + + func testDidDetermineStateForRegion() { + var completed = false + var value: (CLRegionState, CLRegion)? + + let targetValue = (CLRegionState.Inside, CLCircularRegion(center: CLLocationCoordinate2D(latitude: 90, longitude: 180), radius: 10, identifier: "unit tests in cloud")) + + autoreleasepool { + let manager = CLLocationManager() + + _ = manager.rx_didDetermineStateForRegion.subscribe(onNext: { n in + value = (n.state, n.region) + }, onCompleted: { + completed = true + }) + + manager.delegate!.locationManager!(manager, didDetermineState: targetValue.0, forRegion: targetValue.1) + } + + XCTAssertEqual(value?.0, targetValue.0) + XCTAssertEqual(value?.1, targetValue.1) + XCTAssertTrue(completed) + } + + func testMonitorOfKnownRegionDidFailWithError() { + var completed = false + var region: CLRegion? + var error: NSError? + + let targetRegion = CLCircularRegion(center: CLLocationCoordinate2D(latitude: 90, longitude: 180), radius: 10, identifier: "unit tests in cloud") + + autoreleasepool { + let manager = CLLocationManager() + + _ = manager.rx_monitoringDidFailForRegionWithError.subscribe(onNext: { l in + region = l.region + error = l.error + }, onCompleted: { + completed = true + }) + + manager.delegate!.locationManager!(manager, monitoringDidFailForRegion: targetRegion, withError: testError) + } + + XCTAssertEqual(targetRegion, region) + XCTAssertEqual(error, testError) + XCTAssertTrue(completed) + } + + func testMonitorOfUnknownRegionDidFailWithError() { + var completed = false + var region: CLRegion? + var error: NSError? + + let targetRegion: CLRegion? = nil + + autoreleasepool { + let manager = CLLocationManager() + + _ = manager.rx_monitoringDidFailForRegionWithError.subscribe(onNext: { l in + region = l.region + error = l.error + }, onCompleted: { + completed = true + }) + + manager.delegate!.locationManager!(manager, monitoringDidFailForRegion: targetRegion, withError: testError) + } + + XCTAssertEqual(targetRegion, region) + XCTAssertEqual(error, testError) + XCTAssertTrue(completed) + } + + func testStartMonitoringForRegion() { + var completed = false + var value: CLRegion? + + let targetValue = CLCircularRegion(center: CLLocationCoordinate2D(latitude: 90, longitude: 180), radius: 10, identifier: "unit tests in cloud") + + autoreleasepool { + let manager = CLLocationManager() + + _ = manager.rx_didStartMonitoringForRegion.subscribe(onNext: { n in + value = n + }, onCompleted: { + completed = true + }) + + manager.delegate!.locationManager!(manager, didStartMonitoringForRegion: targetValue) + } + + XCTAssertEqual(value, targetValue) + XCTAssertTrue(completed) + } + + #endif + + #if os(iOS) + func testDidRangeBeaconsInRegion() { + var completed = false + var value: ([CLBeacon], CLBeaconRegion)? + + let targetValue = ( + [CLBeacon()], + CLBeaconRegion(proximityUUID: NSUUID(UUIDString: "68753A44-4D6F-1226-9C60-0050E4C00067")!, identifier: "1231231") + ) + + autoreleasepool { + let manager = CLLocationManager() + + _ = manager.rx_didRangeBeaconsInRegion.subscribe(onNext: { n in + value = n + }, onCompleted: { + completed = true + }) + + manager.delegate!.locationManager!(manager, didRangeBeacons: targetValue.0, inRegion: targetValue.1) + } + + XCTAssertEqual(value!.0, targetValue.0) + XCTAssertEqual(value!.1, targetValue.1) + XCTAssertTrue(completed) + } + + func testRangingBeaconsDidFailForRegionWithError() { + var completed = false + var value: (CLBeaconRegion, NSError)? + + let targetValue = ( + CLBeaconRegion(proximityUUID: NSUUID(UUIDString: "68753A44-4D6F-1226-9C60-0050E4C00067")!, identifier: "1231231"), + testError + ) + + autoreleasepool { + let manager = CLLocationManager() + + _ = manager.rx_rangingBeaconsDidFailForRegionWithError.subscribe(onNext: { n in + value = n + }, onCompleted: { + completed = true + }) + + manager.delegate!.locationManager!(manager, rangingBeaconsDidFailForRegion: targetValue.0, withError: targetValue.1) + } + + XCTAssertEqual(value!.0, targetValue.0) + XCTAssertEqual(value!.1, targetValue.1) + XCTAssertTrue(completed) + } + + func testDidVisit() { + var completed = false + var value: CLVisit? + + let targetValue = ( + CLVisit() + ) + + autoreleasepool { + let manager = CLLocationManager() + + _ = manager.rx_didVisit.subscribe(onNext: { n in + value = n + }, onCompleted: { + completed = true + }) + + manager.delegate!.locationManager!(manager, didVisit: targetValue) + } + + XCTAssertEqual(value, targetValue) + XCTAssertTrue(completed) + } + #endif + + func testDidChangeAuthorizationStatus() { + var completed = false + var authorizationStatus: CLAuthorizationStatus? + + #if os(tvOS) + let targetAuthorizationStatus = CLAuthorizationStatus.AuthorizedAlways + #elseif os(iOS) + let targetAuthorizationStatus = CLAuthorizationStatus.AuthorizedAlways + #else + let targetAuthorizationStatus = CLAuthorizationStatus.Authorized + #endif + + autoreleasepool { + let manager = CLLocationManager() + + _ = manager.rx_didChangeAuthorizationStatus.subscribe(onNext: { status in + authorizationStatus = status + }, onCompleted: { + completed = true + }) + + manager.delegate!.locationManager!(manager, didChangeAuthorizationStatus:targetAuthorizationStatus) + } + + XCTAssertEqual(authorizationStatus, targetAuthorizationStatus) + XCTAssertTrue(completed) + } +} \ No newline at end of file diff --git a/RxTests/RxTests.xcodeproj/project.pbxproj b/RxTests/RxTests.xcodeproj/project.pbxproj index f505529f..fbc6f97d 100644 --- a/RxTests/RxTests.xcodeproj/project.pbxproj +++ b/RxTests/RxTests.xcodeproj/project.pbxproj @@ -124,6 +124,9 @@ C8BCD4001C14BCAD005F1280 /* NSLayoutConstraint+RxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8BCD3FD1C14BCAD005F1280 /* NSLayoutConstraint+RxTests.swift */; }; C8CDD7D41B52BEC40043F0C5 /* Observable+BlockingTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8CDD7D31B52BEC40043F0C5 /* Observable+BlockingTest.swift */; }; C8CDD7D51B52BEC40043F0C5 /* Observable+BlockingTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8CDD7D31B52BEC40043F0C5 /* Observable+BlockingTest.swift */; }; + C8CF47661C1DA04700C3FA6E /* CLLocationManager+RxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8CF47651C1DA04700C3FA6E /* CLLocationManager+RxTests.swift */; }; + C8CF47671C1DA04700C3FA6E /* CLLocationManager+RxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8CF47651C1DA04700C3FA6E /* CLLocationManager+RxTests.swift */; }; + C8CF47681C1DA04700C3FA6E /* CLLocationManager+RxTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8CF47651C1DA04700C3FA6E /* CLLocationManager+RxTests.swift */; }; C8E381231B2063CC008CDC33 /* Observable+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8E381221B2063CC008CDC33 /* Observable+Extensions.swift */; }; C8E381281B207D03008CDC33 /* PrimitiveHotObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8E381271B207D03008CDC33 /* PrimitiveHotObservable.swift */; }; C8E381291B207D03008CDC33 /* PrimitiveHotObservable.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8E381271B207D03008CDC33 /* PrimitiveHotObservable.swift */; }; @@ -258,6 +261,7 @@ C8BCD3FB1C14B914005F1280 /* NSView+RxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSView+RxTests.swift"; sourceTree = ""; }; C8BCD3FD1C14BCAD005F1280 /* NSLayoutConstraint+RxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSLayoutConstraint+RxTests.swift"; sourceTree = ""; }; C8CDD7D31B52BEC40043F0C5 /* Observable+BlockingTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = "Observable+BlockingTest.swift"; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; + C8CF47651C1DA04700C3FA6E /* CLLocationManager+RxTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CLLocationManager+RxTests.swift"; sourceTree = ""; }; C8E381221B2063CC008CDC33 /* Observable+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Observable+Extensions.swift"; sourceTree = ""; }; C8E381271B207D03008CDC33 /* PrimitiveHotObservable.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PrimitiveHotObservable.swift; sourceTree = ""; }; C8E3812A1B2083C2008CDC33 /* PrimitiveMockObserver.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PrimitiveMockObserver.swift; sourceTree = ""; }; @@ -375,6 +379,7 @@ C8BCD3F81C14B901005F1280 /* UIView+RxTests.swift */, C8BCD3FB1C14B914005F1280 /* NSView+RxTests.swift */, C8BCD3FD1C14BCAD005F1280 /* NSLayoutConstraint+RxTests.swift */, + C8CF47651C1DA04700C3FA6E /* CLLocationManager+RxTests.swift */, ); path = RxCocoaTests; sourceTree = SOURCE_ROOT; @@ -634,6 +639,7 @@ C811085B1AF50E2A001C13E4 /* Subscription.swift in Sources */, C80DDEDC1BCE9A03006A1832 /* Driver+Test.swift in Sources */, C81108531AF50E2A001C13E4 /* MySubject.swift in Sources */, + C8CF47661C1DA04700C3FA6E /* CLLocationManager+RxTests.swift in Sources */, C81108611AF50E2A001C13E4 /* Observable+BindingTest.swift in Sources */, C69B65001BA88FAC00A7FA73 /* ObserverTests.swift in Sources */, C85F4E431B7F70EA00A866C7 /* CompositeObserverTest.swift in Sources */, @@ -707,6 +713,7 @@ C88BB89A1B07E64B0064D411 /* NSNotificationCenterTests.swift in Sources */, C88BB89B1B07E64B0064D411 /* Observable+MultipleTest+CombineLatest.swift in Sources */, C8941BDA1BD4F58C00A0E874 /* BackgroundThreadPrimitiveHotObservable.swift in Sources */, + C8CF47671C1DA04700C3FA6E /* CLLocationManager+RxTests.swift in Sources */, C88BB89C1B07E64B0064D411 /* ConcurrencyTest.swift in Sources */, C88BB89D1B07E64B0064D411 /* TestObserver.swift in Sources */, C87EC3001C131A940060B19B /* DelegateProxyTest+Cocoa.swift in Sources */, @@ -771,6 +778,7 @@ C80DDEDE1BCE9A03006A1832 /* Driver+Test.swift in Sources */, D2EBEB641BB9B7EF003A27DC /* AssumptionsTest.swift in Sources */, D2EBEB6A1BB9B7EF003A27DC /* DisposableTest.swift in Sources */, + C8CF47681C1DA04700C3FA6E /* CLLocationManager+RxTests.swift in Sources */, D2EBEB791BB9B7FD003A27DC /* RxTest.swift in Sources */, D2EBEB6E1BB9B7EF003A27DC /* Observable+ConcurrencyTest.swift in Sources */, D2EBEB541BB9B7CC003A27DC /* HotObservable.swift in Sources */, diff --git a/RxTests/RxTests.xcodeproj/xcshareddata/xcschemes/RxTests-tvOS.xcscheme b/RxTests/RxTests.xcodeproj/xcshareddata/xcschemes/RxTests-tvOS.xcscheme index 339189bd..30aa7667 100644 --- a/RxTests/RxTests.xcodeproj/xcshareddata/xcschemes/RxTests-tvOS.xcscheme +++ b/RxTests/RxTests.xcodeproj/xcshareddata/xcschemes/RxTests-tvOS.xcscheme @@ -5,6 +5,22 @@ + + + + + + + + + + @@ -45,6 +70,15 @@ savedToolIdentifier = "" useCustomWorkingDirectory = "NO" debugDocumentVersioning = "YES"> + + + +