I\'m using the code below to hide the home indicator on iPhone X, which is working fine in the emulator.
-(BOOL)prefersHomeIndicatorAutoHidden
{
return YES;
Adding the following to the ViewController did the trick for me:
- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures
{
return UIRectEdgeBottom;
}
This made the Home Indicator more transparent and inactivated so that it requires an extra swipe in order to leave the game.
You can also use UIRectEdgeAll
instead of UIRectEdgeBottom
to defer the system gestures on all edges of the screen.