首页 > 代码库 > 系统设置

系统设置

iOS10变更 

Using "App-Prefs:root" instead of "prefs:root"

if let url = URL(string: "App-Prefs:root=NOTIFICATIONS_ID&path=\(Bundle.main.bundleIdentifier ?? "")") {

            if UIApplication.shared.canOpenURL(url) {

                if #available(iOS 10.0, *) {
                    UIApplication.shared.open(url, options: [:], completionHandler: nil)
                } else {
                    UIApplication.shared.openURL(url)
                }
            } else {

                UIApplication.shared.openURL(URL(string: UIApplicationOpenSettingsURLString)!)
            }
        }

schemes settings:https://gist.github.com/KelvinJin/8b25e7154a97c736f0734ca80b9d46a8

系统设置