Ios SwiftHydropbox getCurrentAccount错误
我正在iOS项目中试用SwiftHydroPBOX,当我使用教程中的代码时Ios SwiftHydropbox getCurrentAccount错误,ios,dropbox-api,Ios,Dropbox Api,我正在iOS项目中试用SwiftHydroPBOX,当我使用教程中的代码时 if let client = Dropbox.authorizedClient { // Get the current user's account info client.users.getCurrentAccount().response { response, error in print(response) if let account = response { sel
if let client = Dropbox.authorizedClient {
// Get the current user's account info
client.users.getCurrentAccount().response { response, error in
print(response)
if let account = response {
self.accountStatus.text = "\(account.email)"
} else {
print(error!)
}
}
}
…然后我打印response
它返回nil,我在Xcode控制台中得到以下错误:
输入错误:调用API函数“users/get_current_account”时出错:请求正文:无法将输入解码为JSON
我正在使用CocoaPod的2.0.3版
知道我为什么会出现这个错误吗?这是我们正在研究的版本2.0.3的一个已知问题
同时,您可以暂时将其降级到2.0.2来解决此问题。现在应该在3.0.0.Nice版中修复此问题!我找不到任何发行说明。这些更改在任何地方都有记录吗?仅此而已:只有一个
Auth
到OAuth
的更改需要注意。我非常感谢您发布了一个如何使用奇怪的返回类型getCurrentAccount
的示例,因为库文档肯定没有解释这一点。