Disable WIFI on iPhone with Objective-C

Is it possible to use Objective-C on iPhone to disconnect all WIFI connections. We have an organization that only wants to send data over a cellular connection and does not want the phone to be able to connect to any WIFI networks. We are looking at creating an application that either disables WIFI, or detects when it connects to the network, and then disconnects it.

+5
source share
2 answers

Can I use Objective-C on iPhone to disconnect all WIFI connections?

Note: everyone sees the OP asking if this is possible or not? He does not mention that the API should be publicly available. So here it is:

Class _SBWifiManager = objc_getClass("SBWiFiManager"); // Steal a class from SpringBoard
[[_SBWifiManager sharedInstance] setWiFiEnabled:NO]; // disable

( link )

, iOS, , , . , , AppStore, , .

, , //, . , .

+18

WiFi , .

, , Wi-Fi Reachability Framework, .

+4

All Articles