Bladeren bron

【权限】APP下载目录权限开启

lizhe 1 jaar geleden
bovenliggende
commit
ed38aeb2ba

+ 2 - 0
PDF Office/PDF Master Pro/PDF-Reader-Pro-Edition.entitlements

@@ -4,6 +4,8 @@
 <dict>
 	<key>com.apple.security.app-sandbox</key>
 	<true/>
+	<key>com.apple.security.files.downloads.read-write</key>
+	<true/>
 	<key>com.apple.security.files.user-selected.read-write</key>
 	<true/>
 	<key>com.apple.security.network.client</key>

+ 3 - 1
PDF Office/PDF Master/Class/Home/ViewController/KMHomeViewController.swift

@@ -210,7 +210,9 @@ import Cocoa
         }
         
         self.homeContentView.historyShowPathAction = { [unowned self] view, item in
-            NSWorkspace.shared.open( item.url!.deletingLastPathComponent())
+            let isAccessFilePath = AppSandboxFileAccess().accessFileURL(item.url! as URL, persistPermission: true) {
+                NSWorkspace.shared.open( item.url!.deletingLastPathComponent())
+            }
         }
         
         self.homeContentView.historyRemoveAllFileAction = { [unowned self] view in

+ 2 - 0
PDF Office/PDF Master/PDF_Reader_Pro.entitlements

@@ -8,6 +8,8 @@
 	</array>
 	<key>com.apple.security.app-sandbox</key>
 	<true/>
+	<key>com.apple.security.files.downloads.read-write</key>
+	<true/>
 	<key>com.apple.security.files.user-selected.read-write</key>
 	<true/>
 	<key>com.apple.security.network.client</key>