AppKit document project reports an error when opening a new document in Swift 6
In an AppKit document-based project created by Xcode, setting canConcurrentlyReadDocuments to true allows new documents to open normally in Swift 5, but switching to Swift 6 causes an error.
Judging from the error message, it seems to be a threading issue, but I’m not sure how to adjust the code to support the Swift 6 environment.
The project is the most basic code from an Xcode-created document-based project without any modifications, except for changing the Swift version to 6 and setting canConcurrentlyReadDocuments to true.
Source code: https://drive.google.com/file/d/1ryb2TaU6IX884q0h5joJ...