File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,15 @@ extension DatabaseManager {
62
62
modifyOp. modifyRecordsCompletionBlock = { ( _, _, _) in
63
63
print ( " Resume modify records success! " )
64
64
}
65
- self . container. add ( modifyOp)
65
+ // The Apple's example code in doc(https://developer.apple.com/documentation/cloudkit/ckoperation/#1666033)
66
+ // tells we add operation in container. But however it crashes on iOS 15 beta versions.
67
+ // And the crash log tells us to "CKDatabaseOperations must be submitted to a CKDatabase".
68
+ // So I guess there must be something changed in the daemon. We temperorily add this availabilty check.
69
+ if #available( iOS 15 , * ) {
70
+ self . database. add ( modifyOp)
71
+ } else {
72
+ self . container. add ( modifyOp)
73
+ }
66
74
}
67
75
} )
68
76
}
You can’t perform that action at this time.
0 commit comments