Skip to content

Commit 39b72f1

Browse files
committed
Resolve issue-244
1 parent 90971c2 commit 39b72f1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

IceCream/Classes/DatabaseManagerProtocol.swift

+9-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,15 @@ extension DatabaseManager {
6262
modifyOp.modifyRecordsCompletionBlock = { (_,_,_) in
6363
print("Resume modify records success!")
6464
}
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+
}
6674
}
6775
})
6876
}

0 commit comments

Comments
 (0)