Post

Replies

Boosts

Views

Activity

Reply to Xcode Version 15.0 beta 5 (15A5209g), SwiftData Problem - "The given data was not valid JSON."
I did find a workaround for this, simply wrap your Data object in a Codable struct, like this... struct DrawingData: Codable { var data: Data init(data: Data) { self.data = data } } When you initialize the Model class, make sure to call an init with drawingData (or whatever variable type, as long as it's a codable struct) that is of type DrawingData (or whatever you rename this to). Prior to wrapping the Data object, I had the same crash you all are reporting. I also filed feedback :)
Jul ’23