Unity3d iOS build restarts when regaining focus from browser

| | August 4, 2015

I have an app made in Unity3d for android and iOS. In it, the user has the ability to link their accounts with Facebook and Twitter. For Facebook I use their Unity plugin, for Twitter, I open an external browser page that lets them accept or decline Twitter integration that then redirects to a php page the calls the app URI to return focus to Unity.

On Android this all works perfectly using an Intent in the Manifest. In IOS I’m running into issues though and I don’t really know my way around XCode.

I’m using the newest version, XCode 7 Beta 2. The App runs as expected but for both the Facebook and Twitter authentications, upon returning focus to the App from the Browser, it completely restarts the App as if just launched rather then returning from a suspended state.

In the Unity build I have “Run in Background” selected. I setup the URL Scheme in XCode. Its a pretty basic app so I don’t think its being closed due to Memory usage.

Any ideas or any settings I can change in XCode that might be preventing it from resuming?

*Note, if I just hit Home and send the App to the background it will properly resume, its only when called by the URI from the browser that it seems to completely restart.

Leave a Reply