swift 中的 Moya-ObjectMapper pod 错误

Moya-ObjectMapper pod error in swift

[!] 在目标 zone 上自动分配版本 10.2 的平台 ios,因为未指定平台。请在 Podfile 中为此目标指定一个平台。参见 https://guides.cocoapods.org/syntax/podfile.html#platform

感谢任何帮助。

你应该 provider.rx.request() 而不是 provider.request。新的变更日志包含所有重大变更列表。

你可以得到它here

我建议你使用 pod 'Moya', '9.0'

您的 pod 文件中的版本似乎与 podfile.lock 中的不同。

Observable+ObjectMapper.swift 在 2.4 版本中被 Single+ObjectMapper 取代。

改为使用以下依赖项

pod 'Moya-ObjectMapper/RxSwift', '~> 2.3.2' 或者使用最新的 pod 'Moya-ObjectMapper/RxSwift', '~> 2.4.2'