Search code examples
iphoneioswifipreferencesreachability

Setting Wi-fi Connection


I am new to iPhone development. I am developing an application in which I am using Settings.bundle which allows user to ON\OFF Wi-fi connection. Is there any way to turn ON\OFF device wi-fi when user changes settings from application settings??? I want to turn ON\OFF wi-fi based on changes to settings bundle.


Solution

  • It's not the job of your app to connect to the wireless! You can't alter the wifi settings of the iPhone from inside an application.

    As far as I know, maybe jailbroken phones can do more.

    You just Check Weather your phone is connected with Wifi or other network so http://developer.apple.com/iphone/library/samplecode/Reachability/ will be best place to start with. Have a look at the sample provided by Apple.