Turn Wifi on/off for iphone from an application - iphone

I need to turn on or off the wifi in the iphone. Any ways of doing it? Or is it forbidden (private framework)

All applications written with the public SDK are sandboxed. They only have access to the properties and data which Apple deems feasible to use within that sandbox. I am afraid Wi-fi doesn't come in the list
Pls take a look at this SO question iPhone Wi-Fi Manager SDK and this discussion

Related

Turn on/Off bluetooth, wifi and other settings from custom application in iphone sdk

Is there any framework or utility available for making settings like wifi/bluetooth from iphone application in IOS. I need to develop such an application that can set the wifi and bluetooth on/off.
Apple doesn't provide any APIs for doing this out of the box, The case is different with Jailbroken iOS devices though. SBSettings is an app that does all what you asked but works only on a jailbroken iOS device.
Toggling bluetooth was possible using the GameKit APIs, though it is not a straight forward method. If you want pointers on this i can share the links ( need to do some searching on my bookmarks history though) a simple google search would reveal this method. But i understand your requirement is much more than this one, so like the user24921 said, you need a Jailbreak iPhone/iPad for accessing those Private APIs.
If your app is for in-house distribution, it doesn't require to go through AppStore so it won't be reviewed. Here is an answer that maybe can help you: Programmatically turn on bluetooth in the iphone sdk?
Something like this?
Class BluetoothManager = objc_getClass("BluetoothManager");
bluetoothManager = [BluetoothManager sharedInstance];
[bluetoothManager setEnabled:YES];
[bluetoothManager setPowered:YES];

How to switch between wi-fi networks at runtime (programmatically) in iPhone app

Is it possible to switch between WiFi networks in an iPhone App programmatically? At time of app execution if one network goes down but that is still connected and I want to switch to another wi-fi network. Is this possible?
Your iPhone app shouldn't manage wifi networks. If it does, it won't get approved by Apple to be put in the App Store. The iPhone itself manages wifi connections, not a third-party app.
If you are developing for a jailbroken iphone, you can develop a MobileSubstrate extension/ Tweak with Theos and hook into the SpringBoard Application. The SBWiFiManager interface is part of SpringBoard app and has a lot of useful methods that should help you with controlling WiFi.
There is no iOS API for this, but there can be some possible solutions, like make it available on Cydia for jailbroken devices. AirServer just did this.

iPhone Bluetooth SDK - discover Android / Windows phone 7 devices and background discovery

I am an Android developer and .Net developer and not yet have acquired the needed knowledge regarding iOS .
I did a search on-line but couldnt get conclusive answers to several questions I have which are the following :
1.iOS Bluetooth , do I have to use the Bonjour or Game Kit or can I access a lower level API.
2.Do currently I have an option to perform pairing between an iPhone device and an Android device ?
3.Can an application access the iPhones MAC ID and Friendly ID Bluetooth slots and change them while its in the background ? Or while the device is sleeping ?
4.Can an application set if the iPhone is discoverable or not discoverable to other devices - not iPhone ? Can it perform it while in the background ?
Regards !
Jessy85
This might be helpful to you: How can an iPhone access another non-iPhone device over wireless or Bluetooth?
Generally, there is NO option to communicate with non-iOS device via bluetooth in regular iOS API. GameKit is intended for using between only iOS devices. However I don't know the lower level API which open to only licensed accessory hardware developer except acquiring the license is incredibly hard differently with software license.
1) You can only get to the base API if you are developing specific hardware and are a MFi member. http://developer.apple.com/programs/mfi/
2) Don't think so. But Not really sure
3) You want to change the mac id in the background? Not that I know of. Also it seems like a really questionable idea.
4) Again don't think so. Maybe with MFi but I don't know.

External bluetooth devices to iphone?

is it possible to get data from external bluetooth device(not iphone) to iphone(bluetooth sensor to iphone)?because normally apple requires both end must open the application with same GKsessionID?any help please?will mFI provide special chip t0 install in external device?
This is related to the question about getting data from external device.
Se if this helps. I am trying to use the same in one of my project now.
I'm not sure what you mean about a special chip, but I can tell you that bluetooth can only be accessed via GameKit, which only works on Apple iOS devices. I'm sure there's some private api, but that would require jailbreaking, which would get your app rejected from Apple right away.

Can i use iphone's wifi to comunicate with my own wifi module?

Including data exchange. I can not find such api in apple doc site. If it is not open in 3.1.2 sdk ,would apple release it in sdk4.0? I've heared that google released wireless api on android earlier . Thanks!
iPhones support ad-hoc wifi networking, so I expect you can make your device start an ad-hoc network and have the iPhone user connect manually. I doubt there will be an API for that, it's a security issue.