4

Is there a way to programmatically subscribe to WiFi notifications on iOS?

For example, assuming the user has not disabled WiFi notifications, when they are within range of a WiFi network, the operating system provides a notification of available networks. Can an app subscribe to this notification and provide it's own notification to the user?

Could the app could even check the SSID to see if it is a specific network, and then perform some action?

Jack
  • 10,313
  • 15
  • 75
  • 118

1 Answers1

4

Have a look at the Reachability demo and the System Configuration classes.

This SO question covers this ground and the SSID's: IOS notification of wifi connection including SSID

It looks like the Captive Network Support might also be useful, ito finding the names of networks to which the user is not connected.

Community
  • 1
  • 1
craigmj
  • 4,827
  • 2
  • 18
  • 22
  • Looking at the header file for Reachability it seems the methods that would serve my purpose are: `- (BOOL) startNotifier; - (void) stopNotifier;` Upon receiving the reachability notification, other Reachability methods could be used to determine how the connection could be used: `+ (Reachability*) reachabilityWithHostName: (NSString*) hostName;` Does that seem reasonable? – Jack Jun 18 '12 at 13:07
  • 1
    It seems Reachability is not suitable in this case since it only provides notification of changes. However it cannot be used to receive notifications of the availability of networks where none are yet connected to. – Jack Jun 20 '12 at 11:59