Skip to content

feat(iOS): export downloaded audio with AirDrop and Save to Files - #429

Draft
Sammyjoyplayz wants to merge 1 commit into
pounat:mainfrom
Sammyjoyplayz:feat/ios-download-file-export
Draft

Sammyjoyplayz wants to merge 1 commit into
pounat:mainfrom
Sammyjoyplayz:feat/ios-download-file-export

Conversation

@Sammyjoyplayz

Copy link
Copy Markdown

Downloaded iOS audiobooks and podcast episodes stay inside Absorb's App Group, so users cannot send the downloaded audio through AirDrop or browse it in Files. This adds Downloads > More > Export audio files for completed audio downloads. It opens the iOS share sheet with every original track, letting users choose AirDrop or Save to Files. Saved copies remain after the download is removed in Absorb.

The export checks that every track is present, nonempty, and readable before sharing, and reports a localized error instead of exporting an incomplete book. File URLs preserve the downloaded filenames and avoid loading audiobook bytes into Dart memory. The action uses the existing iPad popover anchor and prevents overlapping share requests. Playback files remain in the App Group used by the widget, and legacy Documents downloads also work. No new dependency or storage migration is needed.

Validation with the repository's pinned Flutter 3.47.0:

  • flutter test --no-pub test/download_export_service_test.dart: 10 tests passed. Coverage includes App Group and Documents paths, multiple tracks in playback order, missing chapters, empty downloads, zero-byte files, invalid paths, a 1 GB file, cancellation, and native errors followed by retry.
  • flutter analyze --no-pub lib/services/download_export_service.dart lib/screens/downloads_screen.dart test/download_export_service_test.dart: no issues.
  • Regenerated localization getters and formatted generated Dart files. New messages use English fallback until translated.
  • git diff --check: passed.

This is a draft because native iOS validation is still pending. The available Mac was unreachable over SSH, so an Xcode build and device transfers could not be checked.

Before marking ready for review:

  • Build for iOS and share a single M4B through AirDrop to another Apple device.
  • Save a multi-track audiobook to Files and confirm every filename and track is preserved.
  • Export a downloaded podcast episode while offline.
  • Confirm the share popover appears beside the menu on iPad, and cancelling permits another export.
  • Check that saving a copy leaves the Absorb download playable, and that removing the download does not remove the exported copy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant