【发布时间】:2019-09-19 15:21:12
【问题描述】:
我创建了一个模型并使用了可编码的模型。我目前正在使用 GMSPath 获取路径,但是在添加到模型类时,我收到错误 Type 'EstimateResponse' does not conform to protocol 'Decodable' 和 Type 'EstimateResponse' does not conform to protocol 'Encodable'
下面是我的模型
class EstimateResponse: Codable {
var path: GMSPath? // Set by Google directions API call
var destination: String?
var distance: String?
}
感谢任何帮助
【问题讨论】:
-
我猜你必须遵循手动方式而不是可编码
标签: ios swift google-maps gmsplace