Hello SwiftData!

preview_player
Показать описание
In this video, Mohammad Azam will introduce SwiftData framework. SwiftData is a brand new framework from Apple released at WWDC 2023. SwiftData is a replacement for Core Data.

You will learn how to persist and display information using SwiftData framework.

#iosdev #swiftui #swiftdata #iosdeveloper Check out my courses at
Рекомендации по теме
Комментарии
Автор

Hi azam, is there any simple example to work with color in swift data, or how to use transformable

OnFlyer
Автор

Few questions:
1. Why is "animation" a parameter of the Query? I don't understand why @Query is responsible for UI animation, shouldn't it only focus on data?
2. @Model only works for classes? What about structs?

vanylaskywalker
Автор

3:02 how you notch code on left hand side ?

LebenWerden
Автор

Good video! Can you show how I can store a UIImage in swift data? 😀

falkborner
Автор

do you think it would be better to replace Realm with this?

도레미파솔-gr
Автор

Thanks for this.
Are you running Xcode 15 beta, alongside Xcode 14?

wmblemania
Автор

Is there an easy way of moving this to a view model, putting less into the view and making it more testable? I am wondering how easy SwiftData is for testing, like making in memory versions.

mistymu
Автор

Is there any way to edit the database directly in an editor ? And can all users share a same public database ? Thanks !

pskx
Автор

Is it based on user defaults or core data? Or its completely new thing? Also if its not the same thing is it better than core data in terms of everything?

saeedrahmatolahi
Автор

Where does it save the data, is this gonna be saved into a local file somewhere?

MainActor
Автор

Macros are actually NOT new. Swift have had macros for a long time. In the SwiftData session they say that you have probably used macros many times, without knowing it. @State, @StateObject, @Environment and more are macros.

However, you haven't been able to expand those macros before, and not making your own macros either. Those things are new.

Even the kind of macro that start with # has been around for some time, but it hasn't been used very much. I saw a mention of #selector, which is a macro that is used when calling methods on Obj-C objects.

dannestrom
Автор

Will SwiftData be supported on iOS 16?

codelabspro
Автор

From what I have seen, you don't have to call the context.save() any more. This is all handled by the macro.

StewartLynch
Автор

Just wait 3 years until 90% of users will use iOS 17. Why apple care so much about minority with accessibility stuff but they never care about people who don't have enough money to buy a new iphone or people who don't even know that they can update their devices? So much problems could be solved if they just open source their frameworks or at least include them with the build for older devices. I really glad that they made iOS 13 support for async functions. But other stuff like SwiftUI is still not usable for iOS 13 apps

untheo