Allows an app to extend its state restoration period.
- macOS 10.7+
This method allows an app to extend the state restoration period beyond the usual. For example, the app crashes before state restoration is complete, then it may offer to discard restorable state on the next launch.
If a window has some state that may take a long time to restore, such as a web page, you may use this method and methods to
complete to extend the period of this crash protection beyond the default.
extend within your implementation of
restore. You would then call
complete some time after the window is fully restored. If the app crashes in the interim, then it may offer to discard restorable state on the next launch.
complete methods act as a counter. Each call to
extend increments the counter, and must be matched with a corresponding call to
complete which decrements it. When the counter reaches zero, the app is considered to have been fully restored, and any further calls are silently ignored.
This method is thread safe.