Post

Replies

Boosts

Views

Activity

Comment on How to safely access Core data NSManagedObject attributes from a SwiftUI view using swift concurrency model?
my understanding is the old performAndWait uses GCD and that we shouldn't be mixing the new swift concurrency model with gcd? So ive been migrating all my 'performAndWait' code over to swift concurrency. Does 'context.performAndWait' and 'await context.perform' play well together? if so no problem using performAndwait in body. Using 'await perform' in .task{} gives the warnings. I have SWIFT_STRICT_CONCURRENCY set to complete. and the com.apple.CoreData.ConcurrencyDebug complier flag set to 1.
Nov ’23
Comment on How to safely access Core data NSManagedObject attributes from a SwiftUI view using swift concurrency model?
I get the following warnings with this code (I put the func in a View) in Version 15.0.1 (15A507), iOS17.0 target: "Passing argument of non-sendable type '() -> ()' outside of main actor-isolated context may introduce data races", "Passing argument of non-sendable type 'NSManagedObjectContext.ScheduledTaskType' outside of main actor-isolated context may introduce data races". I have SWIFT_STRICT_CONCURRENCY set to complete. and the com.apple.CoreData.ConcurrencyDebug complier flag set to 1.
Nov ’23
Comment on Current CloudKit pricing?
here are the limits I've been able to work out. these change but here's what im currently seeing. Batch sizes are limited to 400 records per batch update. You can send 40 requests per second. But there are some other limits so you can't do it sustained. For large loads, I've had best results by queuing requests so the next one isn't send till the previous one is successful. Ends up being about 1 batch request every 13 seconds sustained for records with a small amount of data in each.
Sep ’23
Comment on SwiftUI NavigationLink freezing when tapped
further on this. I was able to stop the freezing on all of my use cases now with .id(UUID()). needed it on all NavigationLinks and some Lists where there was still freezing. not a full fix because setting .id(UUID()) on a List makes it reload every time it appears which is annoying for users when the list takes time to reload (as in my case). a couple of NavigationLinks needed a static id like .id("someid"), some needed .id(UUID()). not sure why. hopefully gets fixed in the sdk as some point.
Nov ’22
Comment on Guys I dont know what I am doing here.
effort sounds about right for someone who can already develop swift macOS apps. Some of those requirements are quite involved, and at first glance may only be possible (or not possible) with some cutting edge research/tech and may take significantly longer than expected as far as effort goes. If u want corporate style governance, you will need to pay corporate style prices if anyone is going to do that.
Sep ’22
Comment on Calling actor method from another actor
thanks. I ended up implementing a custom queue in the first actor to manage and queue the 'async' calls to the second actor. A decent amount of code, would be nice if actors had some standard functionality to do something like this, as the custom queue has quickly become boilerplate code in almost all of my actors now.
Sep ’22