6

I want to use CLLocationManager with RxSwift like in
https://github.com/ReactiveX/RxSwift/issues/413
but I found that CLLocationManager extension was moved to RxExample
(mentioned here https://github.com/ReactiveX/RxSwift/issues/900).

My question is: how to use that code? When I import RxSwift and RxCocoa I don't have access to e.g. locationManager.rx.didUpdateLocations. What should I do so that I can use CoreLocation with RxSwift?

I'm using Xcode 8, Swift 3.

Thanks in advance for your help!

Update

I found that it is recommended that for now we must just copy & paste CLLocationManager extension from RxExample (details here in comments of that commit).

krlbsk
  • 1,051
  • 1
  • 13
  • 24

2 Answers2

3

You have to copy the extension CLLocationManager+Rx.swift and RxCLLocationManagerDelegateProxy.swift to your project as it is no longer part of RxCocoa

Daniel Poulsen
  • 1,446
  • 13
  • 21
2

For anyone who finds this through Google, Rx Location Manager functionality has been moved to: https://github.com/RxSwiftCommunity/RxCoreLocation so there is no longer a need to manually copy and paste files.

Gantrim
  • 37
  • 6