How to use CLLocation extension in RxSwift
Asked Answered
F

2

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).

Fasto answered 25/11, 2016 at 19:25 Comment(0)
H
3

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

Hessney answered 28/11, 2016 at 11:52 Comment(0)
H
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.

Handal answered 10/5, 2019 at 22:21 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.