Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

(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.

Product Version: UE 4.20
more ▼

asked Jan 31 '19 at 07:55 PM in Packaging & Deployment

avatar image


(comments are locked)
10|2000 characters needed characters left
Viewable by all users

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question