caiyue1993/IceCream

Cannot find type 'ListBase' in scope

Mr-ZNN opened this issue ยท 13 comments

Compile the project, the following code reports an error

/// We may get List here
/// The item cannot be casted as List
/// It can be casted at a low-level type ListBase
guard let list = item as? ListBase, list.count > 0 else { break }
var referenceArray = CKRecord.Reference
let wrappedArray = list._rlmArray

mrezk commented

I am having the same issue. This issue started happening at Realm Cocoa v10.8.0.
That means the last supported Realm Cocoa version is v10.7.7.

Had the same issue. You have to use an older version of Realm, to get it to work!

Same issue. Using Realm v10.7.7 fixed problem, but fix this issue with last version of Realm.

I've updated it on my fork to be compatible, but not 100% sure if it works properly, can someone help test it?
https://github.com/timefrancesco/IceCream

  • Requires Realm > 10.8

This issue is currently resolved with Realm v10.7.7 and is expected to be compatible with iCream.

dbmrq commented

I've updated it on my fork to be compatible, but not 100% sure if it works properly, can someone help test it?
https://github.com/timefrancesco/IceCream

  • Requires Realm > 10.8

@timefrancesco Well, I have no idea what you did there, but it seems to be working for me! ๐Ÿป

mrezk commented

@caiyue1993 this issue blocks IceCream from using any version of Realm higher or equal than 10.8. The latest RealmSwift version is now 10.15.1. Have you considered applying timefrancesco's patch? (timefrancesco@606cf63)

@caiyue1993 this issue blocks IceCream from using any version of Realm higher or equal than 10.8. The latest RealmSwift version is now 10.15.1. Have you considered applying timefrancesco's patch? (timefrancesco@606cf63)

Hi @mrezk, sorry now I have no plan to support Realm higher than 10.8 version. And have you guys tested the patch? I don't think dynamicList could suit our cases here. However I'll look deeper later

dbmrq commented

I've updated it on my fork to be compatible, but not 100% sure if it works properly, can someone help test it?
https://github.com/timefrancesco/IceCream

  • Requires Realm > 10.8

@timefrancesco Well, I have no idea what you did there, but it seems to be working for me! ๐Ÿป

Turns out this stopped working for me :/

Like I said here, I started getting errors like "cannot use an empty list to initialize a new field" and then sync operations won't even complete at all. :/

Hey @caiyue1993 - firstly, genuine big thanks for this library - it's very useful :)
I know you've said you have no plans to support Realm >=10.8 - just wondered why, out of interest?

Is there anything we, as the community, can do to help you update it (if it's a case of it being a big job, rather than there being another specific reason)?

Hi guys,

I suggest you using Realm before the version of 10.0.0 for the time being(which is v5.3.2 the last former one). Here is the reasons:

  1. Here is the release note of Realm 10 version: https://github.com/realm/realm-swift/blob/master/CHANGELOG.md#1000-beta1-release-notes-2020-06-08. Since Realm is acquired by MongoDB, the main break changes of the version 10 is "We no longer support Realm Cloud (legacy), but instead the new "MongoDB Realm" Cloud.". Since you're tempting to use iCloud as cloud sync solution, I haven't seen the sufficient reason to migrate to the version 10.

  2. I don't know why the developers at MongoDB Realm remove the support of ListBase and haven't regarded it as a break change: realm/realm-swift@381eda1#diff-0165363078a304086de8efc5042f6a26f299760d001df8e433ee0db147c40c1e. It's happening in their 10.8.0 releases and what depresses me is they even haven't mentioned it in their 10.8.0 release note.

  3. If you want to use the SwiftUI features of Realm, I suggest you could wrap as you needs now. I've checked their change logs recently and there still are many fixes each version. So use the legacy stable version will not be a bad choice, actually will be a fair one.

  4. I'll consider making IceCream compatible with the latest MongoDB Realm when appropriate.

Sorry for the delay of the response and the maintenance as I was busy at company. The good news is I've quitted my job and start my indie hacker life! So I can spend more time on the open source project and crafting my own app(which uses IceCream, absolutely:). Let's make IceCream great again.

@caiyue1993 I was already using realm 10.22.0, is it too late to use the IceCream? ๐Ÿ˜ญ
There doesn't seem to be a way to downgrade realm.
I am very sorry for uploading the realm version. ๐Ÿ˜ž

@blackturtle2 Hi, please check the PR #256. You could use that implementation in advance before getting merged into the master branch.
Don't worry! There must be a way out. ๐Ÿ˜„