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

Use latest RealmSwift #256

Open
wants to merge 60 commits into
base: realm-latest
Choose a base branch
from
Open

Use latest RealmSwift #256

wants to merge 60 commits into from

Conversation

leoz
Copy link

@leoz leoz commented Jan 20, 2022

Use latest RealmSwift v10.21.1.
Example was updated, tested and seems to be working.

@caiyue1993
Copy link
Owner

caiyue1993 commented Jan 20, 2022

Hi @leoz, thanks for the PR and looks nice! I'll look into it and consider the compatible plan. Appreciate for the hard work!

@leoz
Copy link
Author

leoz commented Jan 20, 2022

@caiyue1993 , no worries. Thank you for the awesome job creating this package!

@brightspread
Copy link

There is a problem with archiving Realm 10.7.7 version on Xcode 13. Please consider to merge this commit.

@leoz
Copy link
Author

leoz commented Feb 5, 2022

Hey @caiyue1993 , could you please share the plan of integrating the support for the recent realm? Is there anything I could help with?

@jshrager
Copy link

jshrager commented Feb 7, 2022

Any updates on this? I have been unable to archive my app for the past few months. I couldn’t archive until I upgraded Realm then when I did that I got an IceCream error!

@kleber-maia
Copy link

I'd suggest everyone to just reference this PR's commit directly until it gets merged into master.

@halzo826
Copy link

I'm using machine language translation, so sorry for the weird English!
ListBase has been removed in the latest version of Realm, but if you just want to get the Count or contents of a List, you can use RLMSwiftCollectionBase.

Specifically, you can use the following
CKRecordConvertible.swift
/// 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? RLMSwiftCollectionBase, list._rlmCollection.count > 0 else { break }
var referenceArray = CKRecord.Reference
let wrappedArray = list._rlmCollection

@leoz
Copy link
Author

leoz commented Feb 10, 2022

I'm using machine language translation, so sorry for the weird English! ListBase has been removed in the latest version of Realm, but if you just want to get the Count or contents of a List, you can use RLMSwiftCollectionBase.

Specifically, you can use the following CKRecordConvertible.swift /// 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? RLMSwiftCollectionBase, list._rlmCollection.count > 0 else { break } var referenceArray = CKRecord.Reference let wrappedArray = list._rlmCollection

@halzo826, good point! This change is already included in this CR. Thank you very much!

@jshrager
Copy link

I'd suggest everyone to just reference this PR's commit directly until it gets merged into master.

Can you guide me on how to do this? I’m currently integrating IceCream via Cocoapods - presumably I should remove this in my Podfile then download this pull request and just copy the files in manually?

@kleber-maia
Copy link

kleber-maia commented Feb 17, 2022

I'd suggest everyone to just reference this PR's commit directly until it gets merged into master.

Can you guide me on how to do this? I’m currently integrating IceCream via Cocoapods - presumably I should remove this in my Podfile then download this pull request and just copy the files in manually?

I don't think you can achieve that with Cocoapods. The manual way you described should work. In my case, since I'm using Swift Packages, it's pretty seamless: just provide the commit's SHA in the dialog box.

image

@jshrager
Copy link

Oh perfect, will remove via Cocoapods and try and add back in as a package. I’m sure I can get that working.

just to confirm, that will then build ok using the latest realm?

@kleber-maia
Copy link

Oh perfect, will remove via Cocoapods and try and add back in as a package. I’m sure I can get that working.

just to confirm, that will then build ok using the latest realm?

If you add IceCream via Swift Packages, you may as well remove Realm from Cocoapods / elsewhere. Since Realm is a "sub-dependency", Xcode will install Realm 10.21.1 and keep it updated according to IceCream package definitions.
At least, this is what I did, since I don't want to use a newer version of Realm not tested with IceCream.

@leoz leoz changed the title Use latest RealmSwift v10.21.1 Use latest RealmSwift v10.22.0 Feb 26, 2022
@leoz
Copy link
Author

leoz commented Feb 26, 2022

Updated with latest realm-swift v10.22.0.

@leoz leoz changed the title Use latest RealmSwift v10.22.0 Use latest RealmSwift v10.23.0 Mar 2, 2022
@leoz
Copy link
Author

leoz commented Mar 2, 2022

Updated to RealmSwift v10.23.0. Example app works fine.

@leoz leoz changed the title Use latest RealmSwift v10.23.0 Use latest RealmSwift v10.24.0 Mar 7, 2022
@leoz
Copy link
Author

leoz commented Sep 25, 2022

@caiyue1993 , Great! Thank you!
Just changed the base branch to "realm-latest".

@leoz
Copy link
Author

leoz commented Oct 5, 2022

@caiyue1993 , anything you would like me to change to get this merged into the branch?

@leoz leoz changed the title Use latest RealmSwift v10.30.0 Use latest RealmSwift v10.32.0 Oct 14, 2022
@leoz leoz changed the title Use latest RealmSwift v10.32.0 Use latest RealmSwift v10.32.2 Nov 7, 2022
@leoz leoz changed the title Use latest RealmSwift v10.32.2 Use latest RealmSwift v10.33.0 Dec 1, 2022
@leoz leoz changed the title Use latest RealmSwift v10.33.0 Use latest RealmSwift v10.34.0 Jan 14, 2023
@leoz leoz changed the title Use latest RealmSwift v10.34.0 Use latest RealmSwift Feb 9, 2023
@kushsolitary
Copy link

@leoz thank you for this PR!

@kleber-maia
Copy link

kleber-maia commented Jun 8, 2023

After Apple's SwiftData announcement, is anyone else considering migrating away from Realm + IceCream? 😅 Their statements and the WWDC videos look damn promising. 🚀

Create models with Swift
Model your data using regular Swift types with @model, with no additional files or tools to manage. SwiftData can automatically infer many relationships and you can use clear declarations like @Attribute(.unique) to describe constraints. Like SwiftUI, the source of truth is in your code.

Automatic persistence
SwiftData builds a custom schema using your models and maps their fields efficiently to the underlying storage. Objects managed by SwiftData are fetched from the database when needed and automatically saved at the right moment, with no additional work on your part. You can also take full control using the ModelContext API.

CloudKit syncing
Your data can be stored in files using DocumentGroup and synced via iCloud Drive, or you can use CloudKit to sync data between devices.

@dbmrq
Copy link
Contributor

dbmrq commented Jun 8, 2023 via email

@faizy-ahmed
Copy link

I'm using machine language translation, so sorry for the weird English! ListBase has been removed in the latest version of Realm, but if you just want to get the Count or contents of a List, you can use RLMSwiftCollectionBase.

Specifically, you can use the following CKRecordConvertible.swift /// 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? RLMSwiftCollectionBase, list._rlmCollection.count > 0 else { break } var referenceArray = CKRecord.Reference let wrappedArray = list._rlmCollection

It worked for me, Thanks! @halzo826

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

Successfully merging this pull request may close these issues.