Post

Replies

Boosts

Views

Activity

Comment on SwiftData Predicate Issue Workaround
When I played with this situation on Swift Playgrounds, the starts(with: worked no matter if the ? was used after variable of if the ? was used. The problem is that this condition is being evaluated within the Predicate macro and I think there's something going in with that so that only the data.variable?.starts(with: SomeString) ?? false one works.
Aug ’23
Comment on Xcode Version 15.0 beta 5 (15A5209g), SwiftData Problem - "The given data was not valid JSON."
In my case, I have an existing Core Data / CloudKit app that I am converting to SwiftData / CloudKit. The data structure is in the Cloud via CloudKit. The transition needs to be seamless from Core Data to SwiftData. My model has several image variables. Beta 5 saves the data fine. I can see it in the CloudKit dashboard. And my core data app can get the image data and display the images fine, even the data saved with Beta 5..
Jul ’23