Skip to content

[PB-6484] feature/Live photo support in Photos#490

Open
CandelR wants to merge 2 commits into
feature/modify-carouselfrom
feature/PB-6484-live-photos
Open

[PB-6484] feature/Live photo support in Photos#490
CandelR wants to merge 2 commits into
feature/modify-carouselfrom
feature/PB-6484-live-photos

Conversation

@CandelR

@CandelR CandelR commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Add Live Photo support: upload both components (photo and video), pair them by naming convention, and reconstruct a real Live Photo on save to gallery.

Summary

  • PHAssetExportModule.swift + .m: two new native methods. exportLivePhotoComponents extracts the photo and paired video as raw resource bytes viaPHAssetResourceManager.writeData. saveLivePhoto reconstructs a real Live Photo in the camera roll using PHAssetCreationRequest.addResource.

  • LivePhotoNativeModule.ts: typed TS wrapper for both native methods.

  • PhotoUploadService: Live Photo assets upload both components. The photo component is uploaded first from the native temp export. The paired video follows. Both temps are cleaned up in finally. Return shape changed from Promise<string> to Promise<{ photoUuid: string; pairedVideoUuid?: string }>. If the video upload fails, the photo is still marked synced and the video is retried in the next cycle.

  • PhotoCloudBrowser: fetchMonthFromFolder now runs two passes per day folder, buildPlainNameIndex indexes all plain names first, then buildCloudAssetEntries resolves Live Photo pairing without ordering dependency. Orphan .livephoto.mov files are treated as normal videos.

  • cloud_asset schema: new columns is_live_photo, live_photo_role, paired_remote_file_id. Paired video rows are stored but filtered out of the timeline .

  • PhotoActionsService: saveToDevice branches on isLivePhoto, downloads both components via PhotoAssetFetchService.fetchLivePhotoComponents and calls saveLivePhotoToLibrary. Falls back to photo-only save if the video download or native call fails.

  • PhotoItem: LIVE badge in the top-left corner, mirroring the VideoBadge pattern.

  • Android unaffected: isLivePhotoAsset always returns false, no native code runs.

@CandelR CandelR self-assigned this Jun 10, 2026
@CandelR CandelR added the enhancement New feature or request label Jun 10, 2026
@CandelR CandelR force-pushed the feature/PB-6484-live-photos branch from 1638a83 to 1f5ea1e Compare June 10, 2026 15:00
@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
5.1% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant