is there any new updates in iOS 18 related to CoreData?

Asked on 08/07/2024

1 search

Yes, there are updates in iOS 18 related to CoreData. Specifically, SwiftData, which was introduced in iOS 17, now includes expanded capabilities that integrate with CoreData. Here are some of the key updates:

  1. Custom Data Stores: SwiftData now allows you to use custom data stores, which means you can store data using alternative backends like SQLite, a remote web service, or even a mapped collection of JSON files. By default, SwiftData uses CoreData to store information, but this flexibility opens up new possibilities for data storage (Platforms State of the Union).

  2. History Tracking: SwiftData provides access to the history of changes in a datastore, which is useful for tracking local changes that need to be synced to a remote web service. This feature can be particularly beneficial for those using CoreData's persistent history (Platforms State of the Union).

  3. Migration to SwiftData History: For those using CoreData's persistent history, you can now migrate to SwiftData history, which supports all the features of history tracking by creating your own history types (Track model changes with SwiftData history).

For a deeper dive into these updates, you can check out the sessions: