My app is using internet access, and I want to know if there were used control center. If was used, I want to do some action, like start to update. I am stuck at this question. There are different guides, about "check if app is in background" or "check if wifi status changed", but no information about this. Any advices?
Asked
Active
Viewed 2,042 times
2 Answers
5
You can't do it. The most you can know is that your app was deactivated and then activated again, but you have no way of finding out why. It could be because of the control center, it could be because of the notification center, it could be because a phone call came in, it could be because the user went into the app switcher and came back again... If you think you have a use case for being able obtain this particular information, submit an enhancement request to Apple.

matt
- 515,959
- 87
- 875
- 1,141
-
so you think that checking if app is activated and if it is in background is enough? – Pavel Zagorskyy Jan 19 '15 at 23:03
-
1I don't think anything. You asked how to know if the control center was used, and I told you the answer - you can't know it. I do not say that this is good or bad; it is what it is. – matt Jan 19 '15 at 23:06
-
ok. thank you. now it is clear, why there is any information about this – Pavel Zagorskyy Jan 19 '15 at 23:07
-
Our requirement is: Show the Pin Entry screen when the app is interrupted, if the user has set a pin. However, if control centre is used, no need to show the pin screen. Currently can not do this, because there is no way to distinguish why the app was backgrounded. – FranticRock Nov 23 '15 at 19:16
-
@Alex File a bug report with Apple if you have a good use case. The world will be grateful if you can get them to provide finer distinctions! – matt Nov 23 '15 at 19:24
3
You can use applicationDidBecomeActive:
in your app delegate.
You don't know what the reason is for that part being called, but it will be called after coming back to the app from control center. From there you can refresh things.

Jonny
- 15,955
- 18
- 111
- 232