Electron MAS 构建文件访问

Electron MAS build file access

我对 mac 应用商店构建有疑问。我刚刚将我的应用程序提交到应用程序商店但被拒绝了。唯一的问题是准则 2.4.5(i) - 性能。 Your application accesses the following location ~/Downloads/.##########.com.CompanyName.MyApp.PFa1Yx(删除了个人详细信息)然后它说 majority of developers encounter this issue are opening files in Read/Write instead of Read-Only mode 我不完全确定为什么我的应用程序正在访问该下载文件夹。我正在使用 HTML5 文件对象 API 让用户 select 一个文件 (<input type="file" id="choose_dir" style="display: none;" multiple>) 并在他们完成应用程序时保存文件 (javascript FileSaver 库 saveAs(content, WatermarkText+".zip");)。我以为 com.apple.security.files.user-selected.read-write 在我的 Entitlements.plist 中可以解决这个问题?谢谢!

发现我只需要添加 com.apple.security.files.downloads.read-write 和 com.apple.security.files.user-selected.read-only 以及 com.apple.security.files.user-selected.read-write权利。打开对话框为只读,保存对话框为读写。