Post

Replies

Boosts

Views

Activity

UIDocument crashes when overriding writeContents(_:) in Swift 6
I’ve been trying to set up a UIDocument and override writeContents(...). This works correctly in older projects, but I haven’t been able to get it working in my new iOS 26 app using Swift 6. To troubleshoot, I tested the Particles demo and successfully overrode writeContents there. However, as soon as I switch that project to iOS 26 and Swift 6, calling save; which triggers writeContents, causes the same crash. override public func writeContents( _ data: Any, to url: URL, for _: UIDocument.SaveOperation, originalContentsURL _: URL?, ) throws { ... } Thread 10 Queue : UIDocument File Access (serial)
Topic: UI Frameworks SubTopic: UIKit
1
0
81
3w