-
Notifications
You must be signed in to change notification settings - Fork 368
Add cloud identifier support for cross-device asset identification (iOS 15+/macOS 12+) #1333
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
Draft
Copilot
wants to merge
7
commits into
main
Choose a base branch
from
copilot/add-cloud-identifier-support
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Add getCloudIdentifiers method to PhotoManager - Implement iOS/macOS native code using PHPhotoLibrary API - Support iOS 15+ and macOS 12+ - Update CHANGELOG.md Co-authored-by: AlexV525 <[email protected]>
Co-authored-by: AlexV525 <[email protected]>
Co-authored-by: AlexV525 <[email protected]>
Copilot
AI
changed the title
[WIP] Add support for cloud identifier in AssetEntity
Add cloud identifier support for cross-device asset identification (iOS 15+/macOS 12+)
Nov 16, 2025
Copilot finished work on behalf of
AlexV525
November 16, 2025 04:25
Member
|
@copilot We use |
- Add isIOS and isMacOS helpers to PlatformUtils - Replace Platform.isIOS/isMacOS with PlatformUtils.isIOS/isMacOS - Add PlatformUtils import to photo_manager.dart Co-authored-by: AlexV525 <[email protected]>
Contributor
Author
Fixed in f2e6cbb. Added |
Copilot finished work on behalf of
AlexV525
November 20, 2025 00:52
Member
|
- Use untyped NSDictionary instead of PHLocalIdentifier generic type - Use id type and runtime checks for PHCloudIdentifierMapping and PHCloudIdentifier - This ensures compatibility with older SDK versions during compilation Co-authored-by: AlexV525 <[email protected]>
Contributor
Author
Copilot finished work on behalf of
AlexV525
November 21, 2025 07:37
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add iOS/macOS cloud identifier support for cross-device asset identification
This PR implements support for iOS PHCloudIdentifier API to enable cross-device asset identification for users with the same iCloud account.
Implementation Complete:
What This PR Does:
This PR adds the ability to retrieve cloud identifiers for assets on iOS 15+ and macOS 12+. Cloud identifiers are stable across devices that share the same iCloud Photo Library, solving the issue where the same photo has different local identifiers on different devices.
API Added:
PhotoManager.getCloudIdentifiers(List<String> localIdentifiers)- Batch method for efficiently getting cloud identifiers for multiple assetsAssetEntity.cloudIdentifier- Convenience getter for single assetChanges:
lib/src/managers/photo_manager.dart,lib/src/types/entity.dart): Added public methods with comprehensive documentationlib/src/internal/plugin.dart): Added IosPlugin mixin methodlib/platform_utils.dart): Added isIOS and isMacOS helperslib/src/internal/constants.dart): Added method constantdarwin/photo_manager/Sources/photo_manager/): Implemented using PHPhotoLibrary.cloudIdentifierMappingsForLocalIdentifiers with runtime type checks for SDK compatibilityREADME.md,README-ZH.md,CHANGELOG.md): Added usage examples and documentation in English and ChineseTechnical Details:
idtypes to ensure compilation on older SDKsUse Cases:
This directly addresses issue #1020 where users need to identify the same image across different devices with the same iCloud account.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.