Fix retry delay cast

This commit is contained in:
Maurice Parker 2020-04-28 10:52:08 -05:00
parent b1cced22c4
commit beb63b289e
1 changed files with 2 additions and 2 deletions

View File

@ -30,8 +30,8 @@ enum CloudKitZoneResult {
switch ckError.code {
case .serviceUnavailable, .requestRateLimited, .zoneBusy:
if let retry = ckError.userInfo[CKErrorRetryAfterKey] as? Double {
return .retry(afterSeconds: retry)
if let retry = ckError.userInfo[CKErrorRetryAfterKey] as? NSNumber {
return .retry(afterSeconds: retry.doubleValue)
} else {
return .failure(error: CloudKitError(ckError))
}