Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug report] After calling deleteWithIds, the image is moved to "Recently Deleted" instead of being completely removed. #1250

Closed
lidong-jimi opened this issue Dec 24, 2024 · 2 comments

Comments

@lidong-jimi
Copy link

Version

v.3.2.3

Platforms

Android, iOS

Device Model

iPhone Xs(iOS16.3.1)iPhone 15 ProMAX(iOS17.5)

flutter info

[✓] Flutter (Channel stable, 3.13.9, on macOS 14.2 23C64 darwin-arm64 (Rosetta), locale zh-Hans-CN)
    • Flutter version 3.13.9 on channel stable at /Users/apple/Library/Flutter/flutter_3.19.3
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision d211f42860 (1 year, 2 months ago), 2023-10-25 13:42:25 -0700
    • Engine revision 0545f8705d
    • Dart version 3.1.5
    • DevTools version 2.25.0
    • Pub download mirror https://pub.flutter-io.cn
    • Flutter download mirror https://storage.flutter-io.cn

[!] Android toolchain - develop for Android devices (Android SDK version 35.0.0)
    • Android SDK at /Users/apple/Library/Android/sdk
    • Platform android-35, build-tools 35.0.0
    • ANDROID_HOME = /Users/apple/Library/Android/sdk
    • Java binary at: /Applications/Android Studio.app/Contents/jbr/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)
    ! Some Android licenses not accepted. To resolve this, run: flutter doctor --android-licenses

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.16.2

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 17.0.11+0-17.0.11b1207.24-11852314)

[✓] VS Code (version 1.95.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.102.0

[✓] Connected device (4 available)
    • iPhone 15 Pro Max (mobile)     • 770ED060-AFCE-4CE5-A128-F94205178663 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
    • iPad Air 13-inch (M2) (mobile) • 28EB3FDD-EB4C-4D7C-8B22-9CF0EC06F4EF • ios            • com.apple.CoreSimulator.SimRuntime.iOS-17-5 (simulator)
    • macOS (desktop)                • macos                                • darwin-arm64   • macOS 14.2 23C64 darwin-arm64 (Rosetta)
    • Chrome (web)                   • chrome                               • web-javascript • Google Chrome 131.0.6778.205

[✓] Network resources
    • All expected network resources are available.

How to reproduce?

I found after calling deleteWithIds, the image is moved to "Recently Deleted" instead of being completely removed.
But the documentation clearly states that it should be completely deleted.

Logs

No response

Example code (optional)

final PMFilter filter = FilterOptionGroup(
          createTimeCond: DateTimeCond(min: DateTime(1900, 1, 1), max: maxDate),
          orders: [const OrderOption(asc: true)]);
final List<AssetPathEntity> paths = await PhotoManager.getAssetPathList(
          type: RequestType.image, onlyAll: true, filterOption: filter);
final _path = paths.first;
final total = await _path.assetCountAsync;
final List<AssetEntity> entities =
          await _path.getAssetListPaged(page: 0, size: total);

List<String> deleteIds = [];
for (final entity in entities) {
     deleteIds.add(entity.id);
}
final deleteRes = await PhotoManager.editor.deleteWithIds(deleteIds);


### Contact

_No response_
@fluttercandies-dev
Copy link

AI Summary: deleteWithIds moves images to "Recently Deleted" instead of permanently deleting them, contrary to the documentation. This occurs on iOS devices.

@AlexV525
Copy link
Member

The behavior is system-controlled.

@AlexV525 AlexV525 closed this as not planned Won't fix, can't repro, duplicate, stale Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants