Is SwiftData Secure?

How secure storing the data using SwiftData? What encryption mechanism is it used to store data? Our project has a requirement to shore data using AES 256 encryption.

Replies

PropertyOptions includes encrypt which you can add to properties using the @Attribute modifier: https://developer.apple.com/documentation/swiftdata/propertyoptions/encrypt

That page doesn't specify the encryption algorithm though. SwiftData uses Core Data under the hood, so the answer might exist within some older documentation about Core Data and encryption.

SwiftData uses the platform data protection classes. https://support.apple.com/guide/security/data-protection-classes-secb010e978a/web

This property option is just effecting CloudKit. There isn't any specific symmetric AES encryption option at this time.