Xcode 26.1 / OS 26.1 regression with schema and macros

After Xcode 26.1 was updated and installing the OS 26.1 simulators, my app started crashing related to transformable properties. When I checked my schema, I noticed that properties with array collection types are suddenly set with an option transformable with Optional("NSSecureUnarchiveFromData")], even though I do not use any transformable types. I verified the macros, no transformable was specified. This is causing ModelCoders to encode/decode my properties incorrectly.

This is not an issue when I switch back to OS 26.0 simulators.

Please allow me to make sure I understand correctly: Are you saying that Xcode 26.1 automatically changes your code by adding @Attribute(.transformable) for your SwiftData properties with array collection types?

If that's the case, would you mind to file a feedback report with the code before and after the change for us, and share your report ID here? Thanks!

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

@Model class CollectionType {
    @Attribute var stringArray: [String] = []
    @Attribute var stringSet: Set<String> = []
    
    init() {}
}
    Attribute - name: stringArray, options: [transformable with Optional("NSSecureUnarchiveFromData")], valueType: Array<String>, defaultValue: [], hashModifier: nil
    Attribute - name: stringSet, options: [transformable with Optional("NSSecureUnarchiveFromData")], valueType: Set<String>, defaultValue: [], hashModifier: nil

This is serious stuff. Apple should add a fix to this with iOS26.2

I found a way to avoid the crash but due to this change from @Attribute(.externalStorage) to @Attribute(.transformable), which we never made ourselves.. it's blocking complete iCloud sync mirroring of existing records. Meaning, Customers don't see their data anymore.

As Developers, there is really little we can do. This an issue that Apple needs to fix as soon as possible.

Thank you

I was able to resolve it with the following code, but this is a temporary solution until the real issue is resolved, which is the schema providing incorrect metadata. This is a breaking change.

let archived: Data = try NSKeyedArchiver.archivedData(
    withRootObject: value,
    requiringSecureCoding: true
)
try container.encode(archived, forKey: codingKey)
Xcode 26.1 / OS 26.1 regression with schema and macros
 
 
Q