#How to detect when the game is about to be closed on iOS?

1 messages · Page 1 of 1 (latest)

brittle spear
#

Like when you swipe or press the home button, I'd like the game to automatically save

hollow flame
brittle spear
#

it's kinda vague on iOS support

#

i'd like it to immediately save the moment that you go to the homescreen

wispy aurora
#

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.