Detecting wifi network change in iPad - iphone

I have an iPad application which requires me to stream a video to a user only if he is connected to a particular wifi network. If his wifi network changes, I need to stop streaming.
Is there any way to know that the wifi network that the user is connected to has changed?
Are there any public APIs that can give me the SSID of the wifi network I am connected to or the VSS ID or the MAC address of the router?
Thanks and Rgrds,
Hetal

There is no supported way to do this, but it is possible.
See this question for more details:
Accessing iPhone WiFi Information via SDK

Related

How to get cellular carrier List from my iphone app assign one from them manually from application itself

Is there a way may be using private APIs to obtain the complete list of available Cellular networks and assign one manually from my application itself.
Any help is appreciated
No.
Apple is very protective of that kind of thing - an app can't manually assign either a cellular or wireless network for the device to connect to. There is a special chip in the device that handles cellular connections, and only the user can control WiFi connections.

Simultaneous wifi and 3G connection on mobile

I am developing a peripheral that uses WiFi and Embedded browser, the peripheral looks like an access point to iPhone (and android) but it is not connected to internet. When I connect my phone to this peripheral via Wifi, I loose internet connection on the phone using 3G.
Is there a way to avoid this? I have control over the software of the peripheral so I can change the IP addresses, gateways etc.
Are you going to connect your peripheral to the internet via iPhone's 3G network? If so, why don't you use iphone's Personal hotspot feature?
I believe you can't have both wifi & 3G connection without using Personal hotspot mode.
You can only simulate 3g on your device. In iOS 6 or higher open Settings->Developer->Network Link Conditioner-Status-Choose what you want.

use 3g for internet when connected to adhoc wifi (using private API's)

First and foremost,
I am looking for a resource to use Private API's.
this is an enterprise application and will never go to the app store
I need to take as much configuration out of the users hands as possible.
That being said, I have a device that an ipad will be connected to and communicate with via an adhoc wifi network supplied by the device. the ipad connects to this device and sends raw data to it via socket connections. I also need to connect to the internet for data syncing.
80% of the time, the ipad will be connected to this adhoc wifi device. Management software on the ipad does not allow the user to adjust wifi settings so I am trying to make sure I am connected to my device without limiting my server syncing. I know I can determine the connection using apples Reachability class, this is not what i am looking for. I need to use BOTH 3g AND wifi.
Is there a way to enforce this in code? Or is there a resource for the private API's that I can look at to find a way?
This will be in iOS 5 and the most preferable method would be to just route my http requests via some private api method to use 3G and let the socket requests use wifi to the adhoc device.
code samples would be awesome, links / class names to research would be very much appreciated.
and once again this is not going into the app store, it is an enterprise app
the resolution i found was to assign an ip in the privately assigned ip range the ipad uses (169.254.x.x) to the adhoc device then let the ipad determine an ip. Then see if i can open a socket connection to the device (to determine if its available) and then issue a print.
Going this route, i am still able to use 3g data as well as communicate with the device via wifi.

Can you determine if Wifi security is enabled on network you're connected to on iOS?

In my iOS app, I'd like to be able to determine whether the Wifi network the device is currently connected to has Wifi security of some sort enabled (wep, wpa, etc).
CaptiveNetwork provides the SSID of the connected network, but not much else.
Is there an approved way of determining if WEP/WPA/etc are enabled on the currently connected Wifi network?
Apple is not providing any Wifi related API and all the information that is available to you is given by the actual network, so basically you cant access this information.

Can I use only cellular network (3G or EDGE), even if WIFI is connected on the iPhone?

I was wondering whether I can use the cellular network (3G or 2G or whatever they may have) even if the WIFI is connected and working.
I noticed that Apple has a "Reachability" sample code, but that would only tell me if I can connect using a cellular network; instead, I would like to actually use ONLY the cellular network.
Best Regards,
Noam.
Definitely YES. You should combine Reachability notifications with network interfaces enumeration. And - this point is much important: use BSD socket's bind() call to bind to CONCRETE IP address. Don't use 0.0.0.0 and your app will be network-adaptive and awaring. My poor gist example: https://gist.github.com/avesus/fdb465b60a4f5204845c
No, I wouldn't imagine so.
My understanding is that if the device is connected to Wifi, 3G is not used for data and all data traffic travels via Wifi.
Only cellular data to another cellular device would use the phone provider's network.
I believe that the only way to accomplish this would be to detect if the user is on WiFi (example code is in the "Reachability" example you cited), and if so, prompt them to disable WiFi prior to using your app.