Post

Replies

Boosts

Views

Activity

Reply to SwiftData how to delete an entity
This works fine for me. All entities in Group Model are deleted (and all subentities, @RelationShip delete rule is set to .cascade) : private func deleteAll() { print("delete all!") do { if try modelContext.delete(model: Group.self, where: NSPredicate(value: true), includeSubentities: false) { print("OK Groups cleared !") // what to triggers UI update, or @Query ? } } catch { print("error: \(error)") } } But, no trigger of UI/Query update…
Topic: App & System Services SubTopic: iCloud Tags:
Jul ’23
Reply to Failed to build the scheme (When trying to use Canvas
Same problem here. Unable to build standard template in the preview canvas : `ld: Undefined symbols: unsafeMutableAddressor of self #1 : Crash.Item in Crash.Item.timestamp.init : Foundation.Date, referenced from: Crash.Item.timestamp.init : Foundation.Date in Item.o clang: error: linker command failed with exit code 1 (use -v to see invocation) Xcode 15 beta 4 Release Notes : Previewing view code in a SwiftData app results in a linker failure for the canvas despite that code compiling successfully for device and simulator. (111657477) Workaround: Run your app in the simulator to test your UI instead of using Previews.
Jul ’23
Reply to SwiftData how to delete an entity
This works fine for me. All entities in Group Model are deleted (and all subentities, @RelationShip delete rule is set to .cascade) : private func deleteAll() { print("delete all!") do { if try modelContext.delete(model: Group.self, where: NSPredicate(value: true), includeSubentities: false) { print("OK Groups cleared !") // what to triggers UI update, or @Query ? } } catch { print("error: \(error)") } } But, no trigger of UI/Query update…
Topic: App & System Services SubTopic: iCloud Tags:
Replies
Boosts
Views
Activity
Jul ’23
Reply to Failed to build the scheme (When trying to use Canvas
Same problem here. Unable to build standard template in the preview canvas : `ld: Undefined symbols: unsafeMutableAddressor of self #1 : Crash.Item in Crash.Item.timestamp.init : Foundation.Date, referenced from: Crash.Item.timestamp.init : Foundation.Date in Item.o clang: error: linker command failed with exit code 1 (use -v to see invocation) Xcode 15 beta 4 Release Notes : Previewing view code in a SwiftData app results in a linker failure for the canvas despite that code compiling successfully for device and simulator. (111657477) Workaround: Run your app in the simulator to test your UI instead of using Previews.
Replies
Boosts
Views
Activity
Jul ’23