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.
To do this, open System Preferences, and then click Network. Select Wi-Fi in the sidebar, and then click Advanced. In the Wi-Fi tab, you will see a list of networks. This list is mainly there so you can choose an order of preference for joining networks.
From the Wi-Fi settings, tap the new "Edit" button and authenticate yourself using Face ID, Touch ID, or your passcode. Once authenticated, you'll see a list of Known Networks, which are all of the hotspots you've saved to your iPhone or iCloud Keychain from your other Apple devices.
Go to Start, and select Settings > Network & internet > Wi-Fi > Show available networks, and see whether your wireless network name appears in the list of available networks.
NetSpot — is the best WiFi analyzer app on the Apple App Store. Network Analyzer by Technet — can help you diagnose problems with your WiFi network and gather diagnostic information for a variety of different purposes. Wi-Fi SweetSpots — is more than just an internet speed test utility.
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.
Thats wrong check this app out
http://itunes.apple.com/us/app/ihome-connect-setup-app-for/id450241802?mt=8
It shows available wifi networks
The best you can do in iOS, currently, is display the network the user is currently connected to. iOS doesn't allow you to access a wifi scan from within an app. I've been wrestling with this inability for some time now.
If designing an accessory that has WiFi, where you're trying to pass the user's WiFi network SSID and password, it will be up to the accessory to give the app that wifi scan list. The app can then display the list the accessory gave it to the user.
(I bet that's how the app @zaid pointed out in his answer, "iHome Connect", is doing it.)
Another approach is you could have a screen that prompts the user to enter the password to the wifi network they're connected to already, and then once the accessory is connected to the app, pass those details without the need for a wifi network list. I think that approach has a better user experience.
Plenty of stackoverflow questions that answer how to get the current wifi network, here's a couple:
Getting OSX Connected Wi-Fi Network Name
How do I get the current wifi network name after Yosemite in Swift?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With