Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ulbador

macrumors 68000
Original poster
Feb 11, 2010
1,554
0
I'm curious as to what makes the iPhone automatically connect to WiFi in some applications.

I am writing an app that uses some custom socket wrappers I wrote, and it never seems to "force" the WiFi to come up. This means after a while after the WiFi turns off, my Bonjour stuff stops working because I'm not on the same subnet anymore.

On the other hand, every time I open up my mail or Safari, WiFi pops right up.

Any clue as to what I have to do force WiFi to connect (if available) when my sockets try to connect? At the very least get it to pop up the "Wifi Available, choose a network" popup.
 
Safari uses a key on the info.plist file to pop up the "choose a network" alert, I can't remember exactly the name thou, it's something like UIPersistentNetwork, look over the documentation.
To get EDGE/3G up Safari uses a private API call that you can't use on a app store app.
 
Safari uses a key on the info.plist file to pop up the "choose a network" alert, I can't remember exactly the name thou, it's something like UIPersistentNetwork, look over the documentation.
To get EDGE/3G up Safari uses a private API call that you can't use on a app store app.

There it is. UIRequiresPersistentWiFi. Thank you very much!
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.