#How to detect when the game is about to be closed on iOS?
1 messages · Page 1 of 1 (latest)
Godot Engine documentation
Quitting: Most platforms have the option to request the application to quit. On desktops, this is usually done with the "x" icon on the window title bar. On Android, the back button is used to quit...
it's kinda vague on iOS support
i'd like it to immediately save the moment that you go to the homescreen
The macOS platform support seems to send WINDOW_EVENT_CLOSE_REQUEST on windowShouldClose, which makes sense .. iOS a delegate method on UIApplicationDelegate called applicationWillTerminate that could provide the same place to hook in, but it looks like all this does on iOS in Godot is call Main::cleanup.