[英]macOS Granting full-disk access to sandboxed app not working
I'm experimenting with full-disk access and can't make it working.我正在尝试全盘访问,但无法正常工作。 Here is list of steps I did:
这是我执行的步骤列表:
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.files.bookmarks.app-scope</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
I'm testing it in Xcode 11 and on Catalina.我正在 Xcode 11 和 Catalina 上对其进行测试。 It's dummy app, opening
NSOpenPanel
to let user select archives to decompress and tries to decompress it in the same directory.它是一个虚拟应用程序,打开
NSOpenPanel
让用户 select 档案解压并尝试在同一目录中解压。
In fact it's not about NSOpenPanel
, the question is:事实上,这与
NSOpenPanel
,问题是:
What is necessary to do to make sandboxed app using full-disk access?使用全磁盘访问制作沙盒应用程序需要做什么?
Any hints?有什么提示吗? Am I doing anything wrong?
我做错什么了吗?
Here is solution found for iTerm2 (it is worth read how solution was found).这是为 iTerm2 找到的解决方案(值得一读如何找到解决方案)。 It just adds this to application plist:
它只是将其添加到应用程序 plist 中:
<key>NSSystemAdministrationUsageDescription</key>
<string>I want to read all your files</string>
Documentation is a bit fuzzy. 文档有点模糊。
Sadly this solution doesn't work for launchctld
daemons (this is what I need).遗憾的是,这个解决方案不适用于
launchctld
守护进程(这是我需要的)。 I think daemons are an exception since the do not see UI at all.我认为守护进程是一个例外,因为它根本看不到 UI。
But for regular applications it should work like a charm (didn't test it yet).但是对于常规应用程序,它应该像魅力一样工作(尚未测试)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.