Contents

cloudIdentifierMappings(forLocalIdentifiers:)

Retrieves the cloud identifier mappings for the list of local identifiers.

Declaration

func cloudIdentifierMappings(forLocalIdentifiers localIdentifiers: [String]) -> [String : Result<PHCloudIdentifier, any Error>]

Parameters

  • localIdentifiers:

    A list of local identifiers for which to retrieve cloud identifiers mappings.

Return Value

A dictionary that contains a map of local identifiers to their corresponding cloud mappings.

Discussion

Retrieving cloud 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 cloud identifier fails, the error parameter indicates the reason.

See Also

Converting Between Local and iCloud Identifiers