Unity 5 iOS Player Setting: "Behavior in Background: Custom"

I was hoping someone knew how the new “Custom” value for the iOS Player Setting “Behavior in Background” works? All the documentation I see is for the old 4.x settings. I’m hoping this “Custom” feature allows me to override some method to do some processing in C# code while in the background. Any ideas?

1 Like

did you get any answers on this? I need to keep the audio playing after lock-screen/screen-dimming for my app. Can’t find a way to do this with Unity (it’s so easy on iOS).

I’m interested in this answer as well. I’m working on an app that needs to track GPS coordinates, and it would be nice if it could work while the app is in the background. Anyone know?

Edit: Just dug this documentation page on the iOS player settings: Unity - Manual: iOS Player settings - the screenshot of the other settings panel shows the “Behavior in Background” field, but in the text it’s listed as “Exit on Suspend” and only says it: “Specifies whether the application should quit when suspended to background on iOS versions that support multitasking.”

2 Likes

https://bitbucket.org/Unity-Technologies/iosnativecodesamples/src/812067ac2a45/NativeIntegration/BackgroundTasks/BackgroundFetch/

while this is not very documented (and wont work out of the box as you need to tweak info.plist to include your desired behavior etc) this should be a good enough start

I’m trying to know if there’s a way to have Unity be called in the background on location change so the game can update the user’s location in the server and send them a push notification if the reach somewhere according to some logic. Is that possible?

I’m needing the same for track GPS coordinates, do you know if is possible with this? Thanks!

anyone know how to use it ??