How to open WIFI setting in Swift 3

后端 未结 7 1699
离开以前
离开以前 2021-01-14 00:37

I want to open WIFI setting section from my iOS application, my code was working well before Swift 3 with iOS 9.2

if let settingsURL = URL(string: AppSetting         


        
7条回答
  •  情话喂你
    2021-01-14 01:25

    Use the following for iOS 10 and above:

    if let url = URL(string:"App-Prefs:root=Settings&path=General") { 
        UIApplication.shared.openURL(url)
    }
    

提交回复
热议问题