My App will need to connect to the device's wifi, if the user's wifi connection is not available, my app will guide user to phone's Wi-Fi setting page.
In previous version, I can open phone's Wi-Fi setting with this line of code.
UIApplication.sharedApplication().openULR(NSURL(string:"pref:root=WIFI")!)
However, with iOS 10, with the following line of code, it doesn't work 😟
UIApplication.shared().open(URL(string: "prefs:root=WIFI")!, options: [:], completionHandler: nil)
Any ideas?