swift 中的 Moya-ObjectMapper pod 错误
Moya-ObjectMapper pod error in swift
- 我正在使用 macOsSierra 10.12.6,Xcode9,swift 3
- 重新安装 macOS 后,我克隆了我构建的项目,运行 该项目出现如下所示的错误。Value of type 'Observable' has no member 'mapObjectValue of type 'Observable' has no member 'mapArray'
- 在我的项目中pods使用过。
分析依赖关系
下载依赖项
使用 Alamofire (4.5.1)
使用 AlamofireObjectMapper (4.1.0)
使用 BEMCheckBox (1.4.1)
使用螺栓 (1.8.4)
使用 Cosmos (10.0.0)
使用 ExpandableCell (1.1.0)
使用 FBSDKCoreKit (4.27.0)
使用 FBSDKLoginKit (4.27.0)
使用 FBSDKShareKit (4.27.0)
使用 Facebook 核心 (0.2.0)
使用 Facebook 登录 (0.2.0)
使用 FacebookShare (0.2.0)
使用 GTMOAuth2 (1.1.5)
使用 GTMSessionFetcher (1.1.12)
使用 GoogleSignIn (4.1.0)
使用 GoogleToolboxForMac (2.1.1)
使用 Mixpanel-swift (2.2.1)
使用莫亚 (8.0.3)
使用 Moya-ObjectMapper (2.4)
使用 ObjectMapper (2.2.9)
使用 R.swift (4.0.0)
使用 R.swift. 库 (4.0.0)
使用结果 (3.2.4)
使用 RxCocoa (3.6.1)
使用 RxSwift (3.6.1)
使用 SwiftGifOrigin (1.6.1)
使用 SwiftyBeaver (1.4.2)
使用 Swinject (2.0.0)
使用 SwinjectStoryboard (1.0.0)
使用 TwitterCore (3.0.1)
使用 TwitterKit (3.1.1)
正在生成 Pods 项目
整合客户项目
发送统计数据
Pod安装完成! Podfile 中有 22 个依赖项,总共 pods 安装了 31 个。
[!] 在目标 zone
上自动分配版本 10.2
的平台 ios
,因为未指定平台。请在 Podfile 中为此目标指定一个平台。参见 https://guides.cocoapods.org/syntax/podfile.html#platform
。
我无法真正理解它的 pods 问题或 mac os 问题。
我什至尝试创建虚拟项目并安装 Moya-ObjectMapper pod,但没有成功
感谢任何帮助。
你应该 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'
- 我正在使用 macOsSierra 10.12.6,Xcode9,swift 3
- 重新安装 macOS 后,我克隆了我构建的项目,运行 该项目出现如下所示的错误。Value of type 'Observable' has no member 'mapObjectValue of type 'Observable' has no member 'mapArray'
- 在我的项目中pods使用过。 分析依赖关系 下载依赖项 使用 Alamofire (4.5.1) 使用 AlamofireObjectMapper (4.1.0) 使用 BEMCheckBox (1.4.1) 使用螺栓 (1.8.4) 使用 Cosmos (10.0.0) 使用 ExpandableCell (1.1.0) 使用 FBSDKCoreKit (4.27.0) 使用 FBSDKLoginKit (4.27.0) 使用 FBSDKShareKit (4.27.0) 使用 Facebook 核心 (0.2.0) 使用 Facebook 登录 (0.2.0) 使用 FacebookShare (0.2.0) 使用 GTMOAuth2 (1.1.5) 使用 GTMSessionFetcher (1.1.12) 使用 GoogleSignIn (4.1.0) 使用 GoogleToolboxForMac (2.1.1) 使用 Mixpanel-swift (2.2.1) 使用莫亚 (8.0.3) 使用 Moya-ObjectMapper (2.4) 使用 ObjectMapper (2.2.9) 使用 R.swift (4.0.0) 使用 R.swift. 库 (4.0.0) 使用结果 (3.2.4) 使用 RxCocoa (3.6.1) 使用 RxSwift (3.6.1) 使用 SwiftGifOrigin (1.6.1) 使用 SwiftyBeaver (1.4.2) 使用 Swinject (2.0.0) 使用 SwinjectStoryboard (1.0.0) 使用 TwitterCore (3.0.1) 使用 TwitterKit (3.1.1) 正在生成 Pods 项目 整合客户项目 发送统计数据 Pod安装完成! Podfile 中有 22 个依赖项,总共 pods 安装了 31 个。
[!] 在目标 zone
上自动分配版本 10.2
的平台 ios
,因为未指定平台。请在 Podfile 中为此目标指定一个平台。参见 https://guides.cocoapods.org/syntax/podfile.html#platform
。
我无法真正理解它的 pods 问题或 mac os 问题。
我什至尝试创建虚拟项目并安装 Moya-ObjectMapper pod,但没有成功
感谢任何帮助。
你应该 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'