I implemented the DocumentGroup as follows
The documentation says that this should allow viewing, not editing.
However if I press Cmd+S or click File > Save the ability to save documents still appears to be there. How can I prevent this?
I already set "User Selected File" to Read-Only under Signing and Capabilities in Xcode. Have I missed a step somewhere?
I've added a link to a sample project demonstrating the issue. It can open any plain text file with the .txt extension and can save changes to those files.
Sample Project
TBH this seems like a bug that the app does not honour the File Access settings
Code Block DocumentGroup(viewing: MyDoc.self) { file in ContentView(document: file.$document) }
The documentation says that this should allow viewing, not editing.
Code Block init(viewing: Document.Type, viewer: (FileDocumentConfiguration<Document>) -> Content)
Creates a document group that is able to view file documents.
Available when Document conforms to FileDocument and Content conforms to View.
However if I press Cmd+S or click File > Save the ability to save documents still appears to be there. How can I prevent this?
I already set "User Selected File" to Read-Only under Signing and Capabilities in Xcode. Have I missed a step somewhere?
I've added a link to a sample project demonstrating the issue. It can open any plain text file with the .txt extension and can save changes to those files.
Sample Project
TBH this seems like a bug that the app does not honour the File Access settings