caiyue1993 / IceCream

Sync Realm Database with CloudKit
MIT License
1.94k stars 245 forks source link

Migration not working #263

Open sobabear opened 2 years ago

sobabear commented 2 years ago

Below is the issue template. You can fill each part then submit your issue. Or you can just delete all of these and describe your questions in you-like style. But please remember: the more detailed info you offered, the greater possibility your problem will be solved. 😜

Expected behavior

  1. On existed Project(yes the project is already on production), I tried to introduce IceCream to connect iCloud.
  2. So Existed data also migates to iCloud and also new data will as well.

Actual behavior(optional)

  1. After initialized IceCream and related with it, I tried to migrate my existed realm to iCloud, but it doesn't work properly(I Could not find any on console).

        syncEngine = SyncEngine(objects: [
            SyncObject(type: MemoCollection.self, uListElementType: Memo.self),
            SyncObject(type: Memo.self, uListElementType: MemoImage.self, vListElementType: Tag.self),
            SyncObject(type: MemoImage.self),
            SyncObject(type: Tag.self),
        ], container: CKContainer.init(identifier: "iCloud.WAI.edison"))
        syncEngine?.pushAll()
  2. Of course newly data smoothly upload on iCloud.(Only happened on existed datas)

Reference

Screen Shot 2022-08-14 at 5 59 16 PM

Screen Shot 2022-08-14 at 6 01 03 PM