Reputation: 335
I used the NSNotificationcenter
to implement an event listener on a change in connectivity. When the user connects or disconnects from a WiFi network. Is it possible for this notification to be sent to the app while the app is in suspended mode?
It must be possible to do this, thinking about Skype for example how do it receive an incoming Skype call?
This is how I add my observer
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(reachabilityChanged:)
name:kReachabilityChangedNotification
object:nil];
Upvotes: 1
Views: 1003
Reputation: 37581
No its not possible for a regular app. Skype will be registered as a background app of type voip which have more abilities to execute in the background than do regular apps. There are 4 types of background app: audio, voip, location, newstand.
If an app is not one of these types then if its suspended the only way it can execute again is via the user either tapping the app's icon or responding to a local or remote notification.
Upvotes: 2