3

On Android, to listen to system-wide events like when WiFi has been turned on/off, location has changed, device is now in roaming and many other - one subscribes to these events using BroadcastReceivers.

What technique is used for similar purposes in iOS? Are there at all such global events about which the OS can notify cusom 3d-party apps?

I am new to iOS and haven't found anything in the docs, probably I just don't know the right keywords to look for.

Thanks

iseeall
  • 3,381
  • 9
  • 34
  • 43

2 Answers2

5

An NSNotificationCenter object (or simply, notification center) provides a mechanism for broadcasting information within a program. An NSNotificationCenter object is essentially a notification dispatch table.

See full article - Notification Programming Topics

beryllium
  • 29,669
  • 15
  • 106
  • 125
1

NsNotificationcenter object is helpful within the program or your application, if you want to listen for the events which happens outside your application then you can use NSDistributedNotificationCenter. check the below link. this may help you out. https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/nsnotificationcenter_Class/Reference/Reference.html

RockandRoll
  • 409
  • 5
  • 23