Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find type 'ListBase' in scope #243

Closed
Mr-ZNN opened this issue Jul 6, 2021 · 13 comments
Closed

Cannot find type 'ListBase' in scope #243

Mr-ZNN opened this issue Jul 6, 2021 · 13 comments
Assignees

Comments

@Mr-ZNN
Copy link

Mr-ZNN commented Jul 6, 2021

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
Copy link

mrezk commented Jul 8, 2021

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.

@elliotcz97
Copy link

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

@kenton7
Copy link

kenton7 commented Jul 10, 2021

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

@timefrancesco
Copy link

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

@Mr-ZNN
Copy link
Author

Mr-ZNN commented Jul 15, 2021

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

dbmrq added a commit to dbmrq/IceCream that referenced this issue Jul 31, 2021
@dbmrq
Copy link
Contributor

dbmrq commented Jul 31, 2021

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
Copy link

mrezk commented Sep 21, 2021

@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
Copy link
Owner

@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 added a commit to dbmrq/IceCream that referenced this issue Oct 3, 2021
@dbmrq
Copy link
Contributor

dbmrq commented Oct 3, 2021

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. :/

@SwiftArtery
Copy link

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)?

@caiyue1993 caiyue1993 self-assigned this Jan 5, 2022
@caiyue1993
Copy link
Owner

caiyue1993 commented Jan 5, 2022

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.

@blackturtle2
Copy link

@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. 😞

@caiyue1993
Copy link
Owner

caiyue1993 commented Feb 9, 2022

@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. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants