An open-source cross-platform alternative to AirDrop
fix(ios): fix permission error when picking directory
Tien Do Nam88fa8b706542
diff --git a/app/assets/CHANGELOG.md b/app/assets/CHANGELOG.mdindex d1130841..68c69c9b 100644--- a/app/assets/CHANGELOG.md+++ b/app/assets/CHANGELOG.md@@ -4,6 +4,7 @@- feat: add donation options (@Tienisto)- feat(macos): add Command+W shortcut to close the window (@Q1CHENL)- fix: also show an OLED color mode option when dynamic colors are not supported by OS (@dhruvanbhalara)+- fix(ios): fix permission error when picking directory (@Tienisto)- i18n: add Greek (@multipetros)## 1.12.0 (2023-10-25)diff --git a/app/lib/util/native/pick_directory_path.dart b/app/lib/util/native/pick_directory_path.dartindex c489884d..57df8d07 100644--- a/app/lib/util/native/pick_directory_path.dart+++ b/app/lib/util/native/pick_directory_path.dart@@ -6,11 +6,11 @@ import 'package:localsend_app/util/native/platform_check.dart';/// Opens a file picker to select a directory./// Returns null if the user cancels the selection.Future<String?> pickDirectoryPath() async {- if (checkPlatform([TargetPlatform.android])) {+ if (checkPlatform([TargetPlatform.android, TargetPlatform.iOS])) {/// We need to use the file_picker package because file_selector does not expose the raw path./// We need the raw path to properly manipulate the path to save new files, or/// to list files recursively.- /// https://github.com/miguelpruivo/flutter_file_picker/issues/1282+ /// Also, on iOS, file_selector does not work with directories.return await FilePicker.platform.getDirectoryPath();} else {return await file_selector.getDirectoryPath();