What’s new with databases?
Asked on 07/30/2024
1 search
What's New with Databases at WWDC 2024
Swift Data Enhancements
- Custom Data Stores: Swift Data now supports custom data stores, allowing you to use alternative backends like SQLite, remote web services, or even JSON files. This flexibility enables you to harness Swift Data's API with various storage solutions (Platforms State of the Union, Create a custom data store with SwiftData).
- Index and Unique Macros: New macros have been introduced to improve performance and data integrity. The
index
macro makes queries more efficient by optimizing how properties are stored and retrieved, while theunique
macro ensures no duplicate entries in a set of properties (Platforms State of the Union, What’s new in SwiftData). - History API: Swift Data now includes a history API to track changes to your app's models, making it easier to sync local changes with remote services (What’s new in SwiftData).
Postgres Neo 1.21
- New Asynchronous Interface: Postgres Neo 1.21 introduces a new asynchronous interface and a built-in connection pool. This makes it resilient against intermittent networking failures and improves throughput by distributing queries over multiple connections (Explore the Swift on Server ecosystem).
- Integration with Swift Services: The session demonstrates how to use Postgres Neo to connect a Swift service to a database, including querying and inserting data (Explore the Swift on Server ecosystem).
CloudKit Console
- Enhanced Monitoring and Debugging: The CloudKit Console has new features for monitoring and optimizing database activity, including developer notifications, telemetry tools, and logging capabilities (Use CloudKit Console to monitor and optimize database activity).
Relevant Sessions
- Explore the Swift on Server ecosystem
- Platforms State of the Union
- What’s new in SwiftData
- Create a custom data store with SwiftData
- Use CloudKit Console to monitor and optimize database activity
These updates provide a comprehensive overview of the new capabilities and improvements in database management and integration within the Apple ecosystem.

Explore the Swift on Server ecosystem
Swift is a great language for writing your server applications, and powers critical services across Apple’s cloud products. We’ll explore tooling, delve into the Swift server package ecosystem, and demonstrate how to interact with databases and add observability to applications.

Use CloudKit Console to monitor and optimize database activity
Discover the new observability features in CloudKit Console. Learn how to use Telemetry and Logging to troubleshoot and optimize your app. Find out how to set up alerts to monitor your application’s behavior and notifications to stay on top of the container events that are most important to you. To get the most out of this session, we recommend being familiar with CloudKit containers.

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”.