Re: iOS app restarting from screen one. Why?
Re: iOS app restarting from screen one. Why?
- Subject: Re: iOS app restarting from screen one. Why?
- From: Jonathan Hull <email@hidden>
- Date: Thu, 19 Jun 2014 04:19:43 -0700
My guess would be that Jens is correct. Your app is likely being killed by the system while it is in the background. I tend to run a lot of apps at once and switch between them often, so I run into this all the time.
When your app is backgrounded, you should save your UI state and restore it when you get relaunched. It will appear to the user as if the app was running the whole time.
Thanks,
Jon
On Jun 18, 2014, at 12:59 PM, Alex Zavatone <email@hidden> wrote:
> Honestly, it seems like it's unrolling the navigation controller for some strange reason when I toggle Personal Hotspot while the app is in the background.
>
> Many times I've seen this happen and even when moving various iPhone's Settings panels to the background, then bringing them to the front again.
>
> Never saw it before iOS 7, so I was wondering it anyone else has been seeing this.
>
> Since many of our apps need to be run on a VPN, it's expected that the network connection could change due to user action and it's really not optimal if changing network access forces a nav stack unroll.
>
> I'm not even sure that's what's happening, but it sure appears to be after looking at this happening over at least 5 apps for about 9 months.
>
> Has anyone else seen this type of behaviour?
>
> On Jun 18, 2014, at 2:42 PM, Jens Alfke wrote:
>
>>
>> On Jun 18, 2014, at 11:22 AM, Alex Zavatone <email@hidden> wrote:
>>
>>> Does anyone have any info on what causes the app to seemingly unroll it's Navigation Controller stack and start from the first screen again?
>>
>> Probably because the OS quit the app while it was backgrounded, and it’s being relaunched?
>>
>> Back in the day, before app processes persisted in the background, it was important to explicitly save your UI state (controller stack) and restore it on startup, but I suspect a lot of apps don’t pay attention to this anymore since the relaunch doesn’t happen very often.
>>
>> —Jens
>
> _______________________________________________
>
> Cocoa-dev mailing list (email@hidden)
>
> Please do not post admin requests or moderator comments to the list.
> Contact the moderators at cocoa-dev-admins(at)lists.apple.com
>
> Help/Unsubscribe/Update your Subscription:
>
> This email sent to email@hidden
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden