This project follows Semantic Versioning.
Please follow the appropriate guide below when upgrading to a new major version of Moya-ModelMapper (e.g. 5.0 -> 6.0).
First of all please check Moya's Migration Guide from 9.* to 10.* as there are few changes. (Especially change in CocoaPods from Moya/ReactiveCocoa
to Moya/ReactiveSwift
)
In Moya-ModelMapper
we have one really big change for Moya-ModelMapper/RxSwift
users. Now we don't observe on background scheduler and then return response on main scheduler - it is completely up to you how you wanna do it right now. See issue#26 for more info. If you want to bring back the behavior that was in Moya-ModelMapper
5.0, you would do something like the following.
Instead of:
provider.request(.Repos)
.map(to: [Repo].self)
you would do:
observeOn(ConcurrentDispatchQueueScheduler(qos: .background))
.flatMap { response -> Observable<T> in
provider.request(.Repos)
.map(to: [Repo].self)
}
.observeOn(MainScheduler.instance)