こんにちは、私のアプリから設定の[一般]タブにリダイレクトできません。 「App-環境設定:スウィフト3.0の設定で、自分のアプリから設定の全般タブにリダイレクトする方法
if let url = URL(string:UIApplicationOpenSettingsURLString) {
print(url)
}
こんにちは、私のアプリから設定の[一般]タブにリダイレクトできません。 「App-環境設定:スウィフト3.0の設定で、自分のアプリから設定の全般タブにリダイレクトする方法
if let url = URL(string:UIApplicationOpenSettingsURLString) {
print(url)
}
はiOSの10で、彼らは "環境設定" に変更:ここに私のコードは、この
に助けてください、私は
guard let settingsUrl = URL(string:"prefs:root=General") else {
return
}
if UIApplication.shared.canOpenURL(settingsUrl) {
UIApplication.shared.open(settingsUrl, completionHandler: { (success) in
print("Settings opened: \(success)") // Prints true
})
}
利用コード以下のURLスキーマでprfesを追加しました: 「
guard let profileUrl = URL(string: "App- Prefs:root=General") else { return } if UIApplication.shared.canOpenURL(profileUrl) { UIApplication.shared.open(profileUrl, completionHandler: { (success) in print(" Profile Settings opened: \(success)") }) }
こんにちはHiren、あなたの返事をありがとう。私はアプリの設定に移動することができますが、私はそれが設定の一般タブに直接ナビゲートしたい。あなたの答えはアプリの設定にリダイレクトすることができます –
UIApplication.shared.open(URL(文字列: "prefs:root = General&path = ManagedConfigurationList")!) 私はこれを試してみましたが使用しません –
これはハーフアップかもしれません:UIApplication.sharedApplication .openURL(NSURL(文字列: "prefs:root = General")!) – Hiren
UIApplication.shared.open(URL(STRI ng: "prefs:root = General&path = ManagedConfigurationList")!) 私はこれを試してみましたが、使用しません。 –