Post

Replies

Boosts

Views

Activity

Comment on SwiftData & CloudKit: Arrays of Codable Structs Causing NSKeyedUnarchiveFromData Error
I created a GitHub repository for the minimal project that I was testing previously. It only uses a single Book model. A simple README.md is included: Bookworm I've been resetting the CloudKit schema many times to see if that was the problem. But I still get the error logging. FYI, the sync between devices still works as expected even with the error. I just don't want to run into problems later.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’25
Comment on SwiftData & CloudKit: Arrays of Codable Structs Causing NSKeyedUnarchiveFromData Error
I'll try updating Xcode to that beta version and try to provide a sample project I know encounters the error log when running the app. It might take some time before I can get to this. Did you wait some time to make sure the error didn't pop up? It might take a minute or two. Try inserting a record then re-running and waiting a few minutes. If you want.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’25
Comment on SwiftData and CloudKit: NSKeyedUnarchiveFromData Error
was hoping to use this thread because this is my minimal project which is very simple with one Model. Your code in my other thread is using just a Date and Data field which I expect to work. My minimal project here is trying to get at the underlying issue: Should I ignore the error and assume Apple still supports enums and codable structs when using SwiftData with CloudKit?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Sep ’25
Comment on Should ModelActor be used to populate a view?
@DTS Engineer I was trying to make it clear that the dto was Sendable, that's okay. Does your approach assume that all LabResults are in the SwiftData store? I wanted to combine the manually entered labs (swiftdata) with HealthKit Clinical Lab results in my views like I originally stated. But maybe I should keep the HealthKit Clinical labs sync'd in swiftdata so I have a source of truth. It would just increase the complexity a little, I think
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’25
Comment on Should ModelActor be used to populate a view?
@FPST Although, I think your idea to add a service or view model layer on top would work. That way the views aren’t talking to the actor or HealthKit directly, they’re just observing whatever results that layer publishes. That would still align with @jenyalebid 's comment. So I think that would work.
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Aug ’25
Comment on Question about BGAppRefreshTask approach for medication scheduling app
After reading your post on iOS Background Execution Limits it sounds like I can't rely on BGAppRefreshTaskRequest to ensure a scheduled dose window of 2 weeks for my users. That is because "... there are common scenarios where it won’t grant you any background execution time at all!". How does Apple's Medications app ensure this 2 week window along with Local Notifications? Do they have access to an api that I don't to make it possible?
Apr ’25
Comment on Question about BGAppRefreshTask approach for medication scheduling app
After reading your post on iOS Background Execution Limits it sounds like I can't rely on BGAppRefreshTaskRequest to ensure a scheduled dose window of 2 weeks for my users. That is because "... there are common scenarios where it won’t grant you any background execution time at all!". How does Apple's Medications app ensure this 2 week window along with Local Notifications? Do they have access to an api that I don't to make it possible?
Apr ’25
Comment on Question about BGAppRefreshTask approach for medication scheduling app
After reading your post on iOS Background Execution Limits it sounds like I can't rely on BGAppRefreshTaskRequest to ensure a scheduled dose window of 2 weeks for my users. That is because "... there are common scenarios where it won’t grant you any background execution time at all!". How does Apple's Medications app ensure this 2 week window along with Local Notifications? Do they have access to an api that I don't to make it possible?
Apr ’25
Comment on Question about BGAppRefreshTask approach for medication scheduling app
After reading reading your post on iOS Background Execution Limits it sounds like I can't rely on BGAppRefreshTaskRequest to update the user's dosing schedule window of 2 weeks. This is because there are "common scenarios where it won’t grant you any background execution time at all!". My question is: How does Apple Health's Medications app keep a rolling 2 week schedule window? Maybe they have access to a private api for performing more reliable background execution?
Apr ’25