(IOS): How to close game when enters in Background mode
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 (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: 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 (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.
asked Jan 31 '19 at 07:55 PM in Packaging & Deployment
Follow this question
Once you sign in you will be able to subscribe for any updates here