Post

Replies

Boosts

Views

Activity

Reply to macOS 26 beta 4 and iOS 26 beta 4 - WebKit XML parser crashes parsing XHTML with namespaces
The feedback number was: FB19181123 It seems to be fixed in the beta 5 developer previews! Verified in Xcode beta 5 iOS 26 simulator, Tahoe beta 5 in a virtual buddy VM, and on an iOS device running the beta 5 release. We've had users on the public beta hitting this as well in our app. Hopefully public beta 2 will be out shortly? They usually follow pretty closely after the developer releases.
Topic: Safari & Web SubTopic: General
Aug ’25
Reply to Xcode 26 - New Swift 6.2 Concurrency Sendable Closure Problems
One more update- I was able to work around this for now just by tossing an assumeIsolated into the completion handler. Hopefully, Apple will eventually annotate all of these completion handlers as explicitly @MainActor, now that the Swift language has evolved and the completion handler isn't implicitly MainActor like it used to be. I'm still not sure how one would use the async version of this API, though. It either should have had its closure marked as @MainActor but didn't, or if it DOES need to be nonisolated (because it runs on a thread), that means for animating view properties we have to use the callback version of this API. Here is my final, working (for now) code. I hope Apple annotates these completion closures better so the original code continues to work. NSAnimationContext.runAnimationGroup({(context) -> Void in context.duration = animated ? 0.5 : 0 clipView.animator().setBoundsOrigin(p) }, completionHandler: { MainActor.assumeIsolated { self.endIgnoreFrameChangeEvents() } })
Topic: UI Frameworks SubTopic: AppKit Tags:
Jun ’25
Reply to Xcode 26 - New Swift 6.2 Concurrency Sendable Closure Problems
Just as an update - I took my changes back to Xcode 16.4 and got the same errors when I tried to use the asynchronous version of runAnimationGroup. So, I don't understand how I am supposed to use the async version of this method. Maybe the async version actually runs its closure on a thread? But back to the original error, which is the thing that started this all off: NSAnimationContext.runAnimationGroup({(context) -> Void in context.duration = animated ? 0.5 : 0 clipView.animator().setBoundsOrigin(p) }, completionHandler: { self.endIgnoreFrameChangeEvents() }) Call to main actor-isolated instance method 'endIgnoreFrameChangeEvents()' in a synchronous nonisolated context This is the error that I get in 6.2 / Xcode 26 that I wasn't getting before. I would expect all of these callback-based APIs to run their completion handlers on the main thread. It seems like maybe there's just a @MainActor missing in the definition of completionHandler: here? It didn't seem like this was necessary before Swift 6.2.
Topic: UI Frameworks SubTopic: AppKit Tags:
Jun ’25
Reply to NSAccessibilityElement sendable but not MainActor?
Another data point that NSAccessibilityElement should probably be MainActor: the UIKit counterpart, UIAccessibilityElement, is defined as @MainActor. For now I'm assuming that NSAccessibilityElement should also be marked MainActor and just isn't yet. I've fixed my issues with MainActor.assumeIsolated in the places where my NSAccessibilityElement subclasses need main actor isolation. So far it looks like it is only used on the main thread so this is working for me, at least for now. I'd love confirmation of this by Apple fixing the SDK if this assumption is correct.
Jul ’24
Reply to macOS 26 beta 4 and iOS 26 beta 4 - WebKit XML parser crashes parsing XHTML with namespaces
The feedback number was: FB19181123 It seems to be fixed in the beta 5 developer previews! Verified in Xcode beta 5 iOS 26 simulator, Tahoe beta 5 in a virtual buddy VM, and on an iOS device running the beta 5 release. We've had users on the public beta hitting this as well in our app. Hopefully public beta 2 will be out shortly? They usually follow pretty closely after the developer releases.
Topic: Safari & Web SubTopic: General
Replies
Boosts
Views
Activity
Aug ’25
Reply to Xcode 26 - New Swift 6.2 Concurrency Sendable Closure Problems
One more update- I was able to work around this for now just by tossing an assumeIsolated into the completion handler. Hopefully, Apple will eventually annotate all of these completion handlers as explicitly @MainActor, now that the Swift language has evolved and the completion handler isn't implicitly MainActor like it used to be. I'm still not sure how one would use the async version of this API, though. It either should have had its closure marked as @MainActor but didn't, or if it DOES need to be nonisolated (because it runs on a thread), that means for animating view properties we have to use the callback version of this API. Here is my final, working (for now) code. I hope Apple annotates these completion closures better so the original code continues to work. NSAnimationContext.runAnimationGroup({(context) -> Void in context.duration = animated ? 0.5 : 0 clipView.animator().setBoundsOrigin(p) }, completionHandler: { MainActor.assumeIsolated { self.endIgnoreFrameChangeEvents() } })
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to Xcode 26 - New Swift 6.2 Concurrency Sendable Closure Problems
Just as an update - I took my changes back to Xcode 16.4 and got the same errors when I tried to use the asynchronous version of runAnimationGroup. So, I don't understand how I am supposed to use the async version of this method. Maybe the async version actually runs its closure on a thread? But back to the original error, which is the thing that started this all off: NSAnimationContext.runAnimationGroup({(context) -> Void in context.duration = animated ? 0.5 : 0 clipView.animator().setBoundsOrigin(p) }, completionHandler: { self.endIgnoreFrameChangeEvents() }) Call to main actor-isolated instance method 'endIgnoreFrameChangeEvents()' in a synchronous nonisolated context This is the error that I get in 6.2 / Xcode 26 that I wasn't getting before. I would expect all of these callback-based APIs to run their completion handlers on the main thread. It seems like maybe there's just a @MainActor missing in the definition of completionHandler: here? It didn't seem like this was necessary before Swift 6.2.
Topic: UI Frameworks SubTopic: AppKit Tags:
Replies
Boosts
Views
Activity
Jun ’25
Reply to NSAccessibilityElement sendable but not MainActor?
Another data point that NSAccessibilityElement should probably be MainActor: the UIKit counterpart, UIAccessibilityElement, is defined as @MainActor. For now I'm assuming that NSAccessibilityElement should also be marked MainActor and just isn't yet. I've fixed my issues with MainActor.assumeIsolated in the places where my NSAccessibilityElement subclasses need main actor isolation. So far it looks like it is only used on the main thread so this is working for me, at least for now. I'd love confirmation of this by Apple fixing the SDK if this assumption is correct.
Replies
Boosts
Views
Activity
Jul ’24