我們正在使用CocoaPods config pod 'SwiftyJSON', '3.1.0'
升級到SwiftyJSON Swift 3。SwiftyJSON&Swift 3:無法轉換類型'Int32?'的返回表達式返回類型>'Int?'
我們收到此錯誤:
/Users/xxx/Documents/iOS/xxx/Pods/SwiftyJSON/Source/SwiftyJSON.swift:866:33: Cannot convert return expression of type 'Int32?' to return type 'Int?'
錯誤是在return語句中SwiftyJSON.swift:
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的問題?
我試過,但沒有奏效。 – Mehul
您是否運行了pod update命令並讓它完成?並做一個完整的清潔和構建? –