Post

Replies

Boosts

Views

Activity

Comment on modelContext.fetch() hits assert on release builds, but not on debug builds
Would that hit an assert() - which is basically unhandable crash? Or throw an exception? Also, why would assert be hit only on release builds and not debug builds with exact same code? @Model final class WorkspaceModel: MyModelProtocol { typealias DTOType = WorkspaceDTO var recordName: String final class WorkspaceDTO: MyDtoProtocol { typealias ModelType = WorkspaceModel var recordNameType: String
Feb ’25
Comment on Can someone explain why this state property is nil despite being updated before the other state property?
@darkpaw I reintroduced in my project isProcessingShare state property to reflect sharing progress and now the sheet shows up correctly the first time. Likewise, if from official Apple CKShare demo app I merely remove isProcessingShare then official Apple demo app stops working. I think Apple demo app is poorly designed that for CKShare to work there needs to be progress redrawn.
Topic: UI Frameworks SubTopic: SwiftUI
Aug ’24
Comment on Can someone explain why this state property is nil despite being updated before the other state property?
@darkpaw Still the same behavior - I see "No sheet to show": Here is what I changed: DispatchQueue.main.asyncAfter(deadline: .now() + 3.0) { print ("Setting showingShare to true at \(Date.now.timeIntervalSince1970)") showingShare = true } entered shareConfiguration at 1724105717.827956 returning from shareConfiguration at 1724105718.080661 Setting showingShare to true at 1724105721.139563
Topic: UI Frameworks SubTopic: SwiftUI
Aug ’24
Comment on Can someone explain why this state property is nil despite being updated before the other state property?
Isn't await keyword supposed to serve as synchronization point and line after it executed only when current line is await-ed? FWIW I added following prints to dump time: entered shareConfiguration function at 1724102594.9793549 returning from shareConfiguration function at 1724102595.200552 setting showingShare to true at 1724102595.200789 <-- this is logged just before setting showingShare to true.
Topic: UI Frameworks SubTopic: SwiftUI
Aug ’24