Search code examples
macoselectronelectron-builderelectron-packager

Electron MAS build file access


I have a question about my mac app store build. I just submitted my app to the app store but got rejected. the only problem was guideline 2.4.5(i) - Performance. Your application accesses the following location ~/Downloads/.##########.com.CompanyName.MyApp.PFa1Yx(edited out personal details) It then says majority of developers encounter this issue are opening files in Read/Write instead of Read-Only mode Im not entirely sure why my app is accessing that Downloads folder. I am using HTML5 file object API to have the user select a file (<input type="file" id="choose_dir" style="display: none;" multiple>) and also save the file when they finish with the app (javascript FileSaver library saveAs(content, WatermarkText+".zip");). I thought having com.apple.security.files.user-selected.read-write in my Entitlements.plist would cover that? Thanks!


Solution

  • Figured out I just needed to add com.apple.security.files.downloads.read-write and com.apple.security.files.user-selected.read-only along with com.apple.security.files.user-selected.read-write in my entitlements. Read-only for the open dialog and read-write for the save dialog.