Conforming your SwiftData objects to Codable

Conforming your SwiftData objects to Codable

donny wals

54 года назад

1,913 Просмотров

Learn more about Codable: https://www.donnywals.com/category/codable/

With SwiftData it's relatively easy to define model objects so it makes sense to take a look at making SwiftData models Codable to see if it's better than Core Data. Ultimately, SwiftData is a wrapper around Core Data which means that the @Model macro will at some point generate managed objects, an object model, and more. In this post, we'll see if the @Model macro will also make it easier to use Codable with model objects.

This video is a companion for: https://www.donnywals.com/making-your-swiftdata-models-codable/

Check out my books at: https://donnywals.com/books
See if I have any workshops planned at: https://donnywals.com/workshop
Subscribe to my newsletter here: https://donnywals.com/newsletter

Тэги:

#codable #programming #swiftui
Ссылки и html тэги не поддерживаются


Комментарии: