Search Unity

iOs Background execution

Discussion in 'iOS and tvOS' started by Tom-Goethals, Dec 1, 2017.

  1. Tom-Goethals

    Tom-Goethals

    Joined:
    Mar 6, 2015
    Posts:
    102
    I've got an app that downloads big video files.

    when the app gets suspended i start a "beginBackgroundTaskWithExpirationHandler"
    It allows an iOs app to make use of extra 10 minutes of execution time.
    In those 10 minutes i have a Timer running each second that in turn calls the UnityBatchPlayerLoop() function.

    I'm pretty sure in a Unity 2017.1 the UnityBatchPlayerLoop() function would actually call the update function in my Monobehaviours. However in 2017.2 it does not seem to be calling any code in the game loop anymore.

    The result is that the last download i initiated still continues and completes, but the script that would initiate the next one is no longer running.

    Any ideas or workarrounds to make this possible again?

    Thanks,
    Tom