Post

Replies

Boosts

Views

Activity

Reply to Error when I try to instantiate @Model
I just ran into this as well, and as @Nizelan is saying this occurs when you use a type that is not a valid Swift Data Type. The valid swiftData types are Int8, -128, 127 Int16, -32768, 32767 Int32, -2.1 x 109, 2.1 x 109 Int64, -9.2 x 1018, 9.2 x 1018 UInt8, 0, 255 UInt16, 0, 65535 UInt32, 0, 4.3 x 109 UInt64, 0, 1.8 x 1019 Double, -1.8 x 10308, 1.8 x 10308 Float, -3.4 x 1038, 3.4 x 1038 ```[source](https://subscription.packtpub.com/book/programming/9781789534313/1/ch01lvl1sec14/swift-data-types) I fixed this by using Float instead of CGFloat
Aug ’23