Skip to content

Commit

Permalink
Resolve issue-244
Browse files Browse the repository at this point in the history
  • Loading branch information
caiyue1993 committed Sep 18, 2021
1 parent 90971c2 commit 39b72f1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion IceCream/Classes/DatabaseManagerProtocol.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,15 @@ extension DatabaseManager {
modifyOp.modifyRecordsCompletionBlock = { (_,_,_) in
print("Resume modify records success!")
}
self.container.add(modifyOp)
// The Apple's example code in doc(https://developer.apple.com/documentation/cloudkit/ckoperation/#1666033)
// tells we add operation in container. But however it crashes on iOS 15 beta versions.
// And the crash log tells us to "CKDatabaseOperations must be submitted to a CKDatabase".
// So I guess there must be something changed in the daemon. We temperorily add this availabilty check.
if #available(iOS 15, *) {
self.database.add(modifyOp)
} else {
self.container.add(modifyOp)
}
}
})
}
Expand Down

0 comments on commit 39b72f1

Please sign in to comment.