localIdentifierMappings(for:)
Retrieves the local identifier mappings for the list of cloud identifiers.
Declaration
func localIdentifierMappings(for cloudIdentifiers: [PHCloudIdentifier]) -> [PHCloudIdentifier : Result<String, any Error>]Parameters
- cloudIdentifiers:
A list of cloud identifiers for which to retrieve local identifier mappings.
Return Value
A dictionary that contains a map of cloud identifiers to their corresponding local mappings.
Discussion
Retrieving local identifiers can be an expensive operation, so perform this lookup sparingly. Instead, work with local identifiers and perform mapping work at load and save points. Then store and share the cloud identifiers to make them available on other devices.
If the attempt to look up a local identifier fails, the error parameter indicates the reason.