问题描述
在macOS 10.14 Mojave中需要完全磁盘访问的应用程序必须指示其用户导航至系统偏好设置">安全性和安全性".隐私>完整磁盘访问,然后将应用程序添加到白名单.此过程很复杂,将使此类应用程序的新用户感到沮丧.
Applications which require Full Disk Access in macOS 10.14 Mojave must instruct their users to navigate into System Preferences > Security & Privacy > Full Disk Access and add the application to the whitelist. This procedure is complicated and will frustrate new users of such an app.
为此应该有一个API –异步功能,当由应用程序调用时,该异步功能将向用户显示一个请求全盘访问"的对话框,如果用户单击确定",则会自动将调用的应用程序输入到全盘"中进入白名单.此函数应将用户的是"或否"传递给其完成处理程序.应该有另一个功能可以指示应用程序的完全磁盘访问"状态.
There should be a API for this – an asynchronous function which, when called by an app, would present the user with a dialog requesting Full Disk Access and, if the user clicks OK, automatically enter the calling app into the Full Disk Access whitelist. This function should pass the user's YES or NO to its completion handler. There should be another function which would indicate an app's Full Disk Access status.
似乎Apple已添加API来检查AppleEvent授权.他们是否为全盘访问添加了类似内容?如果是,请将我重定向到该API.
It appears that Apple has added API to check for AppleEvent authorization. Have they added something similar for Full disk access? If yes, please redirect me to that API.
推荐答案
没有API提示用户启用全盘访问".
There is no API that prompts the user to enable Full Disk Access.
在Catalina中的新增功能,如果某个应用尝试访问需要全盘访问"的文件,则该应用会被未选中添加到全盘访问"表视图中.
New in Catalina, if an app attempts to access files that require Full Disk Access, that app will be added, unchecked, to the Full Disk Access table view.
https://asciiwwdc.com/2019/sessions/701
至少,这使引导用户更容易地为应用程序启用全盘访问".
That at least makes it a bit easier to direct users to enable Full Disk Access for an app.
这篇关于是否有任何API可以获取macOS中应用程序的“全盘访问"信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!