So am using a UnityWebRequest to download a file from a server. It’s quite big so we expect the user to be able to lock the app and the file continues to download in the background.
Now if the user locks their phone stays on the iOS splashscreen and then resumes, this behaves as expected. If however, the user changes to another app and then comes back to ours, we get an error “Cannot connect to destination host” even though that request has just been connected.
Any thoughts on what this might be? I wondered if this is something to do with how the iOS apps suspends? Should add, behaviour is as expected on Android and PC/Mac.
I haven’d done this personally but I suspect you might need to assert a background processing mode in your Apple entitlements, which is what goes into your provisioning profile.
Here’s some apple docs:
Not sure if any of that will behave well with Unity’s web requests… perhaps someone here who has tinkered with it could add more info.
Oh! I found a tutorial: this guy (Ray Wenderlich) has a TON of great tutorials, so generally it is worth taking a look at his stuff: