我需要从我的应用程序中打开"文件"应用程序。这是一个内部应用程序,不会出现在应用程序商店中,因此我不担心尝试使用私有URL。
我试过了
"App-Prefs:root=files"
"App-Prefs:root=FILES"
"App-Prefs:root=Files"
在
let url = URL.init(string: "App-Prefs:root=Files")!
UIApplication.shared.open(url, options: [:]) { (Bool) in
print("opened")
}
根据字符串的不同,它要么不会打开任何东西,要么打开设置应用程序。
2条答案
按热度按时间cczfrluj1#
根据this线程,您可以使用
shareddocuments://
作为URLScheme
打开文件应用程序。您可以在this文档中的使用URL方案与应用程序通信一节中阅读有关如何使用URLSchemes
的更多信息。eqfvzcg82#
对于任何寻找代码的人: