Integrating Apple SwiftData with your BlackBerry Dynamics app
You can use Apple SwiftData with your BlackBerry Dynamics app so that your persistent data is stored in the BlackBerry Dynamics secure container. SwiftData is Apple's declarative persistence framework for defining models, querying data, and integrating with SwiftUI. With the BlackBerry Dynamics SwiftData integration, the BlackBerry Dynamics Runtime encrypts the underlying store transparently so that you do not need to write encryption, key management, or file-handling code.
When you integrate SwiftData with your BlackBerry Dynamics app, you substitute GDSecureModelConfiguration for ModelConfiguration and GDSecureModelContainer.create(...) for ModelContainer(...). The integration does not change how you use downstream APIs such as @Model, @Query, ModelContext, FetchDescriptor, #Predicate, and SortDescriptor.
When you integrate SwiftData with BlackBerry Dynamics, your custom app can use standard SwiftData APIs instead of a proprietary data layer. It also provides transparent encryption at rest in the BlackBerry Dynamics container, making full use of the security advantages of the BlackBerry Dynamics SDK.
To use SwiftData in a BlackBerry Dynamics app, you must target iOS 18 or later, as the integration relies on the DataStore API introduced in iOS 18. Your development environment must use Xcode 16 or later. Your BlackBerry Dynamics app must be provisioned and authorized before you create a store.
For more information about unsupported capabilities and known limitations, see Unsupported SwiftData features. For more information about schema evolution, see Considerations for schema migration.