SwiftData error when trying to save array in Model

In my SwiftData @Model I have an attribute attachments: [String]? and I'm getting an error when trying to save it:

CoreData: fault: Could not materialize Objective-C class named "Array" from declared attribute value type "Array<String>" of attribute named attachments.

Getting this error periodically on iOS 18 Beta 7 on iPhone, but the same code works on iPadOS 18 b7 and on macOS Sonoma (14.6.1)

Anyone seen this?

Could you show more code ?

I'm easter egging here. Could it be something like the objective c array is a reference type and the [String] is a value type?

Sorry, was away for a week and now it seems to be working correctly in Beta 8.

Still having issue in release :(

SwiftData error when trying to save array in Model
 
 
Q