Post

Replies

Boosts

Views

Activity

Reply to SwiftData ModelContext Fetch Crashing
It seems to crash with any SwiftData related id, but it's fine when just using the primitive values let id = model.persistentModelID let descriptor = FetchDescriptor<cache>( predicate: #Predicate { $0.cacheOf.persistentModelID == id } // predicate: #Predicate { $0.cacheOf.id == id } or this ) let result = (try? self.modelContext.fetch(descriptor) // 💥 crash here! .first) return result
Sep ’24