Returning from a paused state - iOS

When my application returns from a suspended state, it behaves very strange, so I would like to restart it from scratch in this situation.

But I do not want to restart it every time it enters the background and returns to the foreground.

Is it possible to find out if the application is returning from a paused state or was it just a background state?

Thanx in advance!

+4
source share
1 answer

I believe the short answer to this is No.

I reviewed your question because I needed to know if the EventBackground method was called when moving from suspended to the background and there was no answer to it. If you are considering asking about it, you can at least reassure yourself that the downstream player paid the (minus) price.

Apple's documentation Apple's documentation is not explicit, but I would say that the documentation implies that didEnterBackground is called in this situation, as it states that there are methods associated with each transition, but it is not explicit, so I tested.

I wrote a short test program that uses region monitoring to make the application go from paused to the background. This is not final, since it is also difficult to find out if the application has switched from a background to a suspended one, but after a couple of minutes the applications should be paused if they do not use background modes or tasks. Dismissing an area has changed (via the debugger), I have an Exit Region, but no didnnterBackground.

0
source

Source: https://habr.com/ru/post/1412744/


All Articles