![](/img/trans.png)
[英]iOS Settings - Notifications: How to remove my App if I do not use local notifications?
[英]How do I take the user in my iOS app to the Messages Settings?
我如何将用户从我的应用程序转到“消息设置”? 我知道要使用的代码,但我不知道用于使用UIApplication.shared.open(URL:options :)方法创建正确URL的特定字符串文字。 我认为字面量需要以“ prefs:root =“开头。 它需要类似于以下内容。 我只需要知道使用什么文字而不是“消息”即可。
let urlString = "prefs:root=Messages"
let url = URL(string: urlString)!
let options: [String: Any] = [:]
UIApplication.shared.open(url, options: options) {
bool in
print(bool)
}
我想到了。 我必须使用字符串文字“ App-Prefs:root = MESSAGES”。
let url = URL(string: "prefs:root=MESSAGES")!
UIApplication.shared.openURL(url)
将打开设置->消息
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.