I am trying to open setting(wifi) form my application.
currently, I am using this code
let url = URL(string: "App-Prefs:root=WIFI") //for WIFI setting app
let app = UIApplication.shared
app.openURL(url!)
This code works for me, but when I use this code my application rejected by the app store.
Then I search code on the web I fount this code:-
if let url = URL(string: UIApplicationOpenSettingsURLString) {
if UIApplication.shared.canOpenURL(url) {
_ = UIApplication.shared.open(url, options: [:], completionHandler: nil)
}
}
But this open app setting.
And I want to open either select wifi
screen or device setting
screen