ios - Alamofire 5 在使用 Carthage 安装后显示错误, "' Alamofire 没有名为请求的成员”

标签 ios swift alamofire carthage

我已经使用 Carthage 安装了 Alamofire 5,但它一直显示没有成员请求的错误。

   Alamofire.request(route).responseJSONDecodable { response in }

Module 'Alamofire' has no member named 'request'

最佳答案

您正在使用 Alamofire 5,那么您应该使用 AF.request 而不是 Alamofire.request

关于ios - Alamofire 5 在使用 Carthage 安装后显示错误, "' Alamofire 没有名为请求的成员”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52900273/

相关文章:

ios - Postman Body 对 Swift Alamofire 的原始请求

收据中的 iOS IAP in_app 字段

php - Alamofire 无法将结果识别为 JSON

html - 如何快速更改现有 HTML 字符串的样式?

swift - 如何在 Swift 中实现 IOServiceMatching 回调

swift - 3d 对象导航器和移动

swift - Xcode10.3 "iPhone has denied the launch request. Internal launch error: process launch failed: Unspecified"设备调试问题

php - 使用 php 和 swift 创建托管 strip 帐户

ios - 带有 SupplementaryView 固定在顶部的 JSQMessagesViewController

ios - 我在哪里可以找到 Swift 的 "math, strings, etc... libraries"?