Post

Replies

Boosts

Views

Activity

Restoring the state of a SwiftUI document based application on macOS
In a SwiftUI document based application on macOS, you often see the following scenario: the user closes an application in which several documents have been opened, and the next time he starts the application, he expects that the state of the application will remain and all these documents will also be open. After studying the SwiftUI documentation, I have not found a way to automatically open previous documents, nor is it clear whether the dimensions of the application/document window can be saved so that they apply when it is opened at a later time. I assume SwiftUI has a mechanism to do this, since xCode opens the application after an interruption completely preserving its previous state. So I suspect it's a trivial question, I'm just looking in the wrong place, any help would be appreciated.
0
0
368
Jul ’22