I wonder how can I detect and make a connection to a Wifi network programmatically just like the WifiFoFum app does in Apple Store. This app has been approved and recently updated so there must be a legal way of doing it. If anybody knows any way of doing it please post a code snippet... even if it is an undocumented API call and would probably be rejected by Apple. I just need to know if it can be done and how. Thanks
First and foremost, add permissions in your manifest file. These 4 permissions are required to make changes in your device network connectivity. Setup configuration to connect one specific wifi using WifiConfiguration. WifiConfiguration config = new WifiConfiguration();
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. If you see your wireless network name, select it and select Connect.
Make sure that Wi-Fi is on and you can see your network Go to Settings > Wi-Fi and make sure that Wi-Fi is on. Tap the name of your Wi-Fi network to join. A blue checkmark beside a network name means that you're connected.
With iOS 11, Apple provided public API you can use to programmatically join a WiFi network without leaving your app. The class you'll need to use is called NEHotspotConfiguration . To use it, you need to enable the Hotspot capability in your App Capabilities (Adding Capabilities).
I was looking for the same thing but sadly those features are only available in private APIs which Apple does not allow anymore at all! So there is no official way of finding or connecting to networks!
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