Using Generics with SwiftData Models and Bindable

Hi,

When passing a SwftData Module to a view that receives it in a @Binadable property variable I get an error that it doesn't conform to Observation, I don't know how to solve this issue, even adding @Observable type to the generic in the structure definition won't solve it, any suggestions ?

Kind Regards

Answered by DTS Engineer in 812722022

I seems that your following post asks the same thing and has more information:

You might check if the reply there helps, and follow up there, if needed.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Accepted Answer

I seems that your following post asks the same thing and has more information:

You might check if the reply there helps, and follow up there, if needed.

Best,
——
Ziqiao Chen
 Worldwide Developer Relations.

Using Generics with SwiftData Models and Bindable
 
 
Q