diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 1d00bb5712a..871c37bd153 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -437,6 +437,9 @@
If [code]Use Vsync[/code] is enabled and this setting is [code]true[/code], enables vertical synchronization via the operating system's window compositor when in windowed mode and the compositor is enabled. This will prevent stutter in certain situations. (Windows only.)
+
+ If [code]true[/code], the home indicator is hidden automatically. This only affects iOS devices without a physical home button.
+
diff --git a/main/main.cpp b/main/main.cpp
index cdaee061359..3ac343a3c50 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -1126,6 +1126,8 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph
OS::get_singleton()->set_low_processor_usage_mode_sleep_usec(GLOBAL_DEF("application/run/low_processor_mode_sleep_usec", 6900)); // Roughly 144 FPS
ProjectSettings::get_singleton()->set_custom_property_info("application/run/low_processor_mode_sleep_usec", PropertyInfo(Variant::INT, "application/run/low_processor_mode_sleep_usec", PROPERTY_HINT_RANGE, "0,33200,1,or_greater")); // No negative numbers
+ GLOBAL_DEF("display/window/ios/hide_home_indicator", true);
+
Engine::get_singleton()->set_frame_delay(frame_delay);
message_queue = memnew(MessageQueue);
diff --git a/platform/iphone/view_controller.h b/platform/iphone/view_controller.h
index 68e3bc64fc7..c2ef95acb5f 100644
--- a/platform/iphone/view_controller.h
+++ b/platform/iphone/view_controller.h
@@ -45,4 +45,6 @@
- (BOOL)prefersStatusBarHidden;
+- (BOOL)prefersHomeIndicatorAutoHidden;
+
@end
diff --git a/platform/iphone/view_controller.mm b/platform/iphone/view_controller.mm
index e52ad92bf2a..5bdce6277be 100644
--- a/platform/iphone/view_controller.mm
+++ b/platform/iphone/view_controller.mm
@@ -32,6 +32,8 @@
#include "os_iphone.h"
+#include "core/project_settings.h"
+
extern "C" {
int add_path(int, char **);
@@ -129,6 +131,14 @@ int add_cmdline(int p_argc, char **p_args) {
return YES;
}
+- (BOOL)prefersHomeIndicatorAutoHidden {
+ if (GLOBAL_GET("display/window/ios/hide_home_indicator")) {
+ return YES;
+ } else {
+ return NO;
+ }
+}
+
#ifdef GAME_CENTER_ENABLED
- (void)gameCenterViewControllerDidFinish:(GKGameCenterViewController *)gameCenterViewController {
//[gameCenterViewController dismissViewControllerAnimated:YES completion:^{GameCenter::get_singleton()->game_center_closed();}];//version for signaling when overlay is completely gone