tags:

views:

978

answers:

2

I found some private (undocumented) APIs but Apple does not allow apps to use private frameworks. So does anyone know how to do this using Apple official packages?

like: when youtube app prompts you to the push notification: "Select a Wi-fi network"

Thanks in advance.

+7  A: 

If you set the UIRequiresPersistentWiFi setting in your info.plist file, the iPhone OS will know that your app needs Wifi and pop up the message for you.

As far as I know, no app actually manually displays the wifi selection alert.

Nathaniel Martin
Was I incorrect? Why was this voted down? From the documentation: "How do I display the WiFi connection dialog?The WiFi connection dialog is displayed if WiFi is available, but not currently in use. If your application requires WiFi, you need to add the UIRequiresPersistentWiFi key to Info.plist and set it True. This key notifies the system that your application uses the WiFi network for communication. See "Using WiFi" in iPhone Application Programming Guide for additional information on this key."
Nathaniel Martin
Hi Nathaniel, I have no idea who voted you down. But your solutions WORKS for me. Thanks! I'll vote you UP and make this the correct question.However, after turning on and off the wi-fi connection in my iPod for testing, the app stops asking me and doesn't show me the list of networks anymore. What should i do?
SimpleCode
A: 

Hi Simplecode,

I would like to get the current wifi network details in iPhone through xcode. You had mentiioned about private APIs. could you please give more details?

iPhone_issue
This answer does not answer this question, so you should repost it as a separate question.
Peter Hosey