# (IOS): How to close game when enters in Background mode

**URL:** <https://forums.unrealengine.com/t/ios-how-to-close-game-when-enters-in-background-mode/442493>\
**Category:** Mobile\
**Tags:** xcode-ios, background, freezes, unreal-engine, iOS, UE4, question\
**Created:** [January 31, 2019, 7:55pm UTC](https://forums.unrealengine.com/t/ios-how-to-close-game-when-enters-in-background-mode/442493 "2019-01-31T19:55:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![jorgeonidas](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@jorgeonidas](https://forums.unrealengine.com/u/jorgeonidas)\
**Post date:** [January 31, 2019, 7:55pm UTC](https://forums.unrealengine.com/t/ios-how-to-close-game-when-enters-in-background-mode/442493/1 "2019-01-31T19:55:12Z")

</div>

We are developing our fisrt game in Unreal Engine v4.20 both Android and iOS platforms. The issue occurs in the iOS version, when i press home to exit the game and then press the game’s icon to re-enter inmediately it shows a snapshot of the last played level follow by restart to the splash screen.

Doing the respective research ([The iOS Application Lifecycle | HackerNoon](https://hackernoon.com/application-life-cycle-in-ios-12b6ba6af78b)), i found that its the default ios lifecycle, iOS sends the game to background and past at least 5 seconds it goes to suspend, but thats its not the behavior desired.

First we tried with this class: [UApplicationLifecycleComponent | Unreal Engine Documentation](https://api.unrealengine.com/INT/API/Runtime/Engine/Components/UApplicationLifecycleComponent/index.html) to close the game by console command, or using the following functions: FPlatformProcess::RequestExit(false); but it does not even listen the ApplicationWillEnterBackgroundDelegate event.

Next We tried adding UIApplicationExitsOnSuspend ([How to kill your app when it enters background mode | iOS Dev Diary](https://pinkstone.co.uk/how-to-kill-your-app-when-it-enters-background-mode/)) into Project Settings-\>Additional Plist Data, now the game closes and it freezes when we try to re-enter, showing the spanshot of the last level played but no more happends.

I spent more than a week finding solution for this problem and will appreciate anny help, suggestion or advice.
