fix: ios, file transfer, home dir (#12657)

Signed-off-by: fufesou <linlong1266@gmail.com>
This commit is contained in:
fufesou
2025-08-15 00:00:05 +08:00
committed by GitHub
parent 16b625f8b4
commit 0b9d7925b5
2 changed files with 11 additions and 3 deletions

View File

@@ -156,7 +156,10 @@ class PlatformFFI {
// only support for android
_homeDir = (await ExternalPath.getExternalStorageDirectories())[0];
} else if (isIOS) {
_homeDir = _ffiBind.mainGetDataDirIos();
// The previous code was `_homeDir = (await getDownloadsDirectory())?.path ?? '';`,
// which provided the `downloads` path in the sandbox.
// It is unclear why we now use the `data` directory in the sandbox instead.
_homeDir = _ffiBind.mainGetDataDirIos(appDir: _dir);
} else {
// no need to set home dir
}