Post

Replies

Boosts

Views

Activity

Reply to Is there a way to update Observable on the main thread but not to read from it?
Thanks Quinn for chiming in. You are right, app architecture is not Apple's responsibility. I guess we just need to know the intended usage of the the API. So to that end, I guess the 'ask' is the following clarifications: Are we suppose to update properties of a @Observable on the main thread? Are we suppose to properties of an object that is a property of Observable on the main thread? Is it safe to read properties of a @Observable on a background thread? Is it safe to read properties of an object that is a property of @Observable on a background thread? Is there a way to enforce check at compile time for setting properties of @Observable (for example by decorating it with @MainActor), but at the same time allow read to be not on the main thread?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Oct ’24
Reply to Is there a way to update Observable on the main thread but not to read from it?
Thanks Quinn for chiming in. You are right, app architecture is not Apple's responsibility. I guess we just need to know the intended usage of the the API. So to that end, I guess the 'ask' is the following clarifications: Are we suppose to update properties of a @Observable on the main thread? Are we suppose to properties of an object that is a property of Observable on the main thread? Is it safe to read properties of a @Observable on a background thread? Is it safe to read properties of an object that is a property of @Observable on a background thread? Is there a way to enforce check at compile time for setting properties of @Observable (for example by decorating it with @MainActor), but at the same time allow read to be not on the main thread?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Is there a way to update Observable on the main thread but not to read from it?
@DTS Engineer Thanks for the explanation! That explains a lot but I guess two questions remain: When we update a property of @Observable do we have to isolate to the main actor? When we update the properties of an object that is a property of Observable do we have to isolate to the main actor?
Topic: UI Frameworks SubTopic: SwiftUI Tags:
Replies
Boosts
Views
Activity
Oct ’24
Reply to Issue when creating Bookmark with security scope on macOS 26 RC
are we actually talking about the same bug though? Coe 256 seems to be an issue only for root drive of exFAT. But I can get a secure bookmark of a root drive of HFS
Topic: App & System Services SubTopic: Core OS Tags:
Replies
Boosts
Views
Activity
Sep ’25