SwiftData Tutorial: How to Easily Persist Data in SwiftUI - Xcode 15 - Swift

Поділитися
Вставка
  • Опубліковано 27 жов 2024

КОМЕНТАРІ • 42

  • @tubakun8616
    @tubakun8616 5 місяців тому

    This is such a great channel. The series on SwiftData is especially useful. However, for some reason, when trying to go back to them, youtube will never surface them for me in the search results. I hope this info is useful.

  • @SteviePortuguese
    @SteviePortuguese 9 місяців тому

    you are a life saver and amazing teacher

  • @georgehyker
    @georgehyker 11 місяців тому

    Great explanation on what is going on and how to use Swiftdata. Thank you!

  • @jasonmountain4643
    @jasonmountain4643 Рік тому

    Wow! Exciting stuff!

  • @AlessandroBellino
    @AlessandroBellino Рік тому

    Another Great Tutorial.

  • @cloftis130
    @cloftis130 Рік тому

    Thanks for a great overview of using Swiftdata. Keep up the good content.

  • @mica00ela
    @mica00ela Рік тому

    Great video, you're really clear and to the point. I agree this is better than the WWDC videos... Thanks!

  • @EricTMCode
    @EricTMCode 8 місяців тому

    Great, thank you Karin 🚀

  • @FranGaribay
    @FranGaribay Рік тому

    Awesome!! Thanks for this!!

  • @bassemmagdi6671
    @bassemmagdi6671 Рік тому

    Thank you for the awesome explanation ❤

  • @PolkLC
    @PolkLC Рік тому

    Thank you! Your explanation and examples helped me a lot! Much better than the WWDC videos.

  • @lys1344
    @lys1344 Рік тому

    This is so helpful!! It answered a lot of my questions. Thanks so much

  • @FranGaribay
    @FranGaribay Рік тому

    Awesome! thanks

  • @w0mblemania
    @w0mblemania Рік тому

    Super-helpful Karin, thank you.

  • @SparkGripRacer
    @SparkGripRacer Рік тому

    Awesome content as always! The WWDC videos did not give that much insight, thanks for clarify this topic! I guess SwiftData is making SwiftUI projects even more easy to setup.

  • @felixtube71
    @felixtube71 6 місяців тому

    You are awesome ty!

  • @awunnenb
    @awunnenb 7 місяців тому

    helped me a lot, thank you very much

  • @AndrewDChristie
    @AndrewDChristie 8 місяців тому

    Thanks!

  • @Another0neTime
    @Another0neTime 8 місяців тому

    Thank you.

  • @MaryAnnAdelman
    @MaryAnnAdelman Місяць тому

    Would you be doing any videos on SwiftData migration?

  • @Johnsmith-mu4ux
    @Johnsmith-mu4ux 2 місяці тому

    Karin, can you please use dark theme for xcode when recording if possible, Thank you!

  • @AlexanderWebster_
    @AlexanderWebster_ 5 місяців тому

    Hahaha nooo. I am a beginner programmer and watched to the end only to find out I need to use Core Data lol. Oh well! Thank you for the tutorial anyways! Subscribed.

  • @TheBeachLab
    @TheBeachLab 11 місяців тому

    Thank you Karin. I don't quite understand the way swiftdata creates relationships between models. There is no foreign key to use and it works like magic when you add data. However, what about when you preload data? I am trying to combine this video with the one you made about importing data in JSON but the question is: How do you specify the relations of the imported data?

  • @tonibuhlmann6594
    @tonibuhlmann6594 Рік тому

    Hi Karin, thank you so much for that introduction of Swift Data. Top as always. But how do you move and save a Todo item in the list? Greetings Toni

  • @chezchezchezchez
    @chezchezchezchez Рік тому

    I'm brand new to swift today!
    Should I use Swiftdata or older technology?
    Thanks!

  • @DailyDoseof-Health
    @DailyDoseof-Health Рік тому

    ❤❤❤❤

  • @macmcmillen6282
    @macmcmillen6282 Рік тому

    This was very interesting, and helpful. Thanks for the video! Have you ever tried looking at the underlying SQLite database (Core Data or SwiftData) using an SQLite manager like Native SQLite Manager? I wonder if that's doable and perhaps helpful to see how the data is actually getting stored in the underlying database. Perhaps you could do a video on that? Thanks Karin!

    • @SwiftyPlace
      @SwiftyPlace  Рік тому +2

      I did not look at the SQLight file. I am guessing it is very similar to how Core Data handles it. From what I saw at WWDC, you can have Core Data and SwiftData in the same project accessing the same SQLight file.
      From the documentation "Combining Core Data’s proven persistence technology and Swift’s modern concurrency features, SwiftData enables you to ...". The Core Data container and SwiftData container should work similar and the database handling should be the same.

  • @kenturnbull9679
    @kenturnbull9679 Рік тому

    Very Good (Sehr Gut) tutorial! Regarding using @Bindable instead of @Binding...Can I use @Bindable when dealing with a set; such as...@Binding var selectedObjects: Set? This works using @Binding but throws an error when I attempt to use @Bindable.

  • @GiorgioRomano93
    @GiorgioRomano93 Рік тому

    great talk! thanks!
    I have a question, a normal usage of db entries is to list them, on tap open a modal which can be used to "update" the entry data. Normally a save on the nav bar will persist the changes, otherwise an app closure or modal dismiss will not save them.
    In swiftdata update is performed automagically, and apparently there is no way to "upsert" an entry with saving a new object with same primary key (unique attribute in swiftdata)
    What should I do?

  • @penyt
    @penyt Рік тому

    Thanks for your helpful content! Just wondering, what's the difference between explicitly defining the relationship using the @Relationship macro and the case you have here without using it? I'm having some difficulties using the macro and it works perfectly without.

  • @kenturnbull9679
    @kenturnbull9679 Рік тому

    Given that the app data is persisted to the SQLIte db, is it possible to create and use a SQLite view in SwiftUI?

  • @irfanmohammed5127
    @irfanmohammed5127 9 місяців тому

    How can we create sections for same dates using creationdate instead of isDone

  • @TitaHB
    @TitaHB Рік тому

    Hi, i am still searching how to save swiftdata on iCloud container

  • @markaurelius61
    @markaurelius61 Рік тому

    Thanks! Why did you make the tags array property optional?

    • @SwiftyPlace
      @SwiftyPlace  Рік тому +1

      I had problems with the relationship for many to many. It only works for optionals.
      Also if you want to use iCloud sync, all relationships must be optional.

    • @kenturnbull9679
      @kenturnbull9679 Рік тому

      @@SwiftyPlace Could the tags array not be declared as an empty array instead of optional?

  • @LebenWerden
    @LebenWerden 4 місяці тому

    Hi, how I can use onMove modifier on todos?

  • @satoriappdev
    @satoriappdev Рік тому

    Awesome stuff, however Realm seems a bit more intuitive than this. I'm going to give it a look, i'm just not sure if it's the best way of storing data.

    • @Notkdenben
      @Notkdenben 8 місяців тому

      May I ask how so?

  • @AndrewDChristie
    @AndrewDChristie 9 місяців тому

    Thanks!