How do I use a deferred property
Asked on 06/13/2025
1 search
To use a deferred property in your app, you can take advantage of the new deferred property macro introduced in the session Explore new advances in App Intents. A deferred property is useful when you have a property whose value is expensive to fetch, such as data from a network server, and you want to fetch it only when explicitly requested by the system.
Here's a brief overview of how to implement a deferred property:
-
Mark the Property as Deferred: You can mark a property as deferred to provide an asynchronous getter. This allows you to perform network calls or other expensive operations only when the system requests the property, rather than when the entity is created or passed around.
-
Use Asynchronous Getter: Inside the deferred property, you can call methods that perform the necessary operations, such as network requests. The async getter will be invoked only when system features, like Shortcuts, request the property.
-
Choose Wisely: It's recommended to use a computed property over a deferred property due to lower system overhead. However, if the property is too expensive to calculate, falling back to a deferred property is a viable option.
For more details, you can refer to the session Explore new advances in App Intents at the timestamp 21:02.

Explore new advances in App Intents
Explore all the new enhancements available in the App Intents framework in this year’s releases. Learn about developer quality-of-life improvements like deferred properties, new capabilities like interactive app intents snippets, entity view annotations, how to integrate Visual Intelligence, and much more. We’ll take you through how App Intents is more expressive than ever, while becoming even easier and smoother to adopt. We’ll also share exciting new clients of App Intents this year like Spotlight and Visual Intelligence, and learn to write app intents that work great in those contexts.

Get to know App Intents
Learn about the App Intents framework and its increasingly critical role within Apple’s developer platforms. We’ll take you through a ground-up introduction of the core concepts: intents, entities, queries, and much more. You’ll learn how these pieces fit together and let you integrate your app through Apple’s devices, from software features like Spotlight and Shortcuts to hardware features like the Action button. We’ll also walk through how App Intents is your app’s gateway to integrating with Apple Intelligence going forward.

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