WiFi question

Discussion in 'iOS Programming' started by ulbador, Dec 3, 2010.

  1. ulbador macrumors 68000

    ulbador

    Joined:
    Feb 11, 2010
    #1
    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.
     
  2. Manty macrumors member

    Joined:
    Mar 18, 2008
    Location:
    Lisbon, Portugal
    #2
    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.
     
  3. ulbador thread starter macrumors 68000

    ulbador

    Joined:
    Feb 11, 2010
    #3
    There it is. UIRequiresPersistentWiFi. Thank you very much!
     

Share This Page