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

Generated on 8/7/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:

Platforms State of the Union

Platforms State of the Union

Discover the newest advancements on Apple platforms.

What’s new in SwiftData

What’s new in SwiftData

SwiftData makes it easy to add persistence to your app with its expressive, declarative API. Learn about refinements to SwiftData, including compound uniqueness constraints, faster queries with #Index, queries in Xcode previews, and rich predicate expressions. Join us to explore how you can use all of these features to express richer models and improve performance in your app. To discover how to build a custom data store or use the history API in SwiftData, watch “Create a custom data store with SwiftData” and “Track model changes with SwiftData history”.

Track model changes with SwiftData history

Track model changes with SwiftData history

Reveal the history of your model’s changes with SwiftData! Use the history API to understand when data store changes occurred, and learn how to use this information to build features like remote server sync and out-of-process change handing in your app. We’ll also cover how you can build support for the history API into a custom data store.

Create a custom data store with SwiftData

Create a custom data store with SwiftData

Combine the power of SwiftData’s expressive, declarative modeling API with your own persistence backend. Learn how to build a custom data store and explore how to progressively add persistence features in your app. To get the most out of this session, watch “Meet SwiftData” and “Model your schema with SwiftData” from WWDC23.

What’s new in device management

What’s new in device management

Learn about the latest management capabilities for iOS, iPadOS, macOS, and visionOS, then discover the latest changes to Apple Business Manager and Apple School Manager. We’ll also share updates to Activation Lock, SoftwareUpdate, and Safari management.

What’s new in UIKit

What’s new in UIKit

Explore everything new in UIKit, including tab and document launch experiences, transitions, and text and input changes. We’ll also discuss better-than-ever interoperability between UIKit and SwiftUI animations and gestures, as well as general improvements throughout UIKit.

What’s new in privacy

What’s new in privacy

At Apple, we believe privacy is a fundamental human right. Learn about new and improved permission flows and other features that manage data in a privacy-preserving way, so that you can focus on creating great app experiences.