ios - exiting app produces error

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By gp1

When exiting the app by double clicking on my ipad’s home button and swiping the window out of the screen, I get the following error:

No windows have a root view controller, cannot save application state

Any ideas as to what would cause this?

Thank you in advance.

Did you ever find a solution to this, this error still appears in Xcode 14.1 when exporting from Godot 3.5.1

No windows have a root view controller, cannot save application state

It is not clear to me what the implications of this error are.

JayFi | 2022-11-23 02:33

When running the app on your device via xcode, use the stop button in xcode to exit the app.

gp1 | 2022-11-23 15:09

Did you find a solution to this problem? I have the same problem. To be honest, I don’t see a consequence, but would be great to know how to fix it.

Rabbids_krolb | 2023-05-27 11:43

:bust_in_silhouette: Reply From: decepticlown

If you are using get_tree().quit() then you should know that method is not supported in iOS. According to Apple, applications are supposed to be closed with home button. In that case just hide the exit button if OS.get_name() == "iOS" : button.hide()

I use the Home button, edited question.

gp1 | 2021-09-27 10:59

Maybe its some background process being cut off with sudden app kill. Is it working as it supposed to work? Then I’d not worry too much unless you are loosing some kind of save data. You might get more info from devs if you open an issue on github.

decepticlown | 2021-09-27 17:36