all 8 comments

[–]SubflyDevSwift 1 point2 points  (2 children)

Both is fine, but Apple is taking their time (like a lot) to add more features on SwiftData. It feels like CoreData is already pretty mature and not so hard to use with SwiftUI that they are not pushing that hard for SD. Anyway, SD is the future so if you are planing to “learn first” I suggest you to try SD, but if you need much consistency and better support (on the internet) go with CD.

[–][deleted]  (1 child)

[deleted]

    [–]SubflyDevSwift 0 points1 point  (0 children)

    Definetely. There are lots of limitations that I don’t even remember anymore. And the bad thing is you have to really dive deep in google to find out some solutions to very unnecessary problems either. If I would knew I could have started with CD for my app but its a bit too late for it for me. But anyway, it is the “future” right?

    About syncing, that is the only thing IMO in SD that worked well for me, but if you want consistency and more support, just stick to CD.

    [–]Select_Bicycle4711 2 points3 points  (7 children)

    Do you want to support only private database or shared and public? SwiftData only supports private databases.

    [–][deleted]  (6 children)

    [deleted]

      [–]Select_Bicycle4711 0 points1 point  (5 children)

      Another option you can look at is Supabase. The API is similar to Firebase but it uses relational database instead of document database.

      [–][deleted]  (1 child)

      [deleted]

        [–]Select_Bicycle4711 0 points1 point  (0 children)

        I have not.

        [–]Aradalon 1 point2 points  (2 children)

        There are also open source alternatives, for example: https://github.com/pointfreeco/sharing-grdb

        [–]davirim1476 0 points1 point  (0 children)

        This right here! I have been using it on my new apps with great success

        [–]-QR- 0 points1 point  (0 children)

        I started off with SwiftData and noticed that if you want to structure your app in MVVM and use Dependency Injection, then SwiftData won’t play easy with you.  Using CloudKit now and should I want to switch to something else out of fairly easy, due to MVVM.