How to open WIFI setting in Swift 3

后端 未结 7 1690
离开以前
离开以前 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:02

    Edited 26-02-20, Pay attention, in versions later than ios 10 your binary will be rejected

    It's possible on iOS 10 and Swift 3

    let url = URL(string: "App-Prefs:root=WIFI") //for WIFI setting app
    let app = UIApplication.shared
    app.openURL(url!)
    

提交回复
热议问题