【发布时间】:2017-02-10 00:35:27
【问题描述】:
我们正在升级到带有 CocoaPods 配置 pod 'SwiftyJSON', '3.1.0' 的 SwiftyJSON Swift 3。
我们收到此错误:
/Users/xxx/Documents/iOS/xxx/Pods/SwiftyJSON/Source/SwiftyJSON.swift:866:33: 无法转换类型为“Int32?”的返回表达式?返回类型 '诠释?'
错误出现在 SwiftyJSON.swift 中的 return 语句上:
public var int: Int? {
get {
return self.number?.int32Value
}
set {
if let newValue = newValue {
self.object = NSNumber(value: newValue)
} else {
self.object = NSNull()
}
}
}
有人知道是什么问题吗?这是我们的 CocoaPods 配置还是 SwiftyJSON 的问题?
【问题讨论】:
标签: cocoapods swift3 swifty-json