![](/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.