diff --git a/lib/ui/reports/reports_screen_vm.dart b/lib/ui/reports/reports_screen_vm.dart index c843634f8..dbab72bb3 100644 --- a/lib/ui/reports/reports_screen_vm.dart +++ b/lib/ui/reports/reports_screen_vm.dart @@ -429,7 +429,9 @@ class ReportsScreenVM { if (kIsWeb) { WebUtils.downloadTextFile(filename, csvData); } else { - final directory = await getApplicationDocumentsDirectory(); + final directory = await (isDesktopOS() + ? getDownloadsDirectory() + : getApplicationDocumentsDirectory()); final filePath = directory.path + file.Platform.pathSeparator + filename; final csvFile = file.File(filePath); diff --git a/macos/Runner/DebugProfile.entitlements b/macos/Runner/DebugProfile.entitlements index 08c3ab17c..6b87f8385 100644 --- a/macos/Runner/DebugProfile.entitlements +++ b/macos/Runner/DebugProfile.entitlements @@ -4,11 +4,13 @@ com.apple.security.app-sandbox + com.apple.security.network.client + + com.apple.security.files.downloads.read-write + com.apple.security.cs.allow-jit com.apple.security.network.server - com.apple.security.network.client - diff --git a/macos/Runner/Release.entitlements b/macos/Runner/Release.entitlements index ee95ab7e5..e80b834f8 100644 --- a/macos/Runner/Release.entitlements +++ b/macos/Runner/Release.entitlements @@ -6,5 +6,7 @@ com.apple.security.network.client + com.apple.security.files.downloads.read-write +