<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/Photos/PHPhotoLibrary/cloudIdentifierMappings(forLocalIdentifiers:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "s:So14PHPhotoLibraryC6PhotosE23cloudIdentifierMappings19forLocalIdentifiersSDySSs6ResultOySo07PHCloudE0Cs5Error_pGGSaySSG_tF"
  },
  "title" : "cloudIdentifierMappings(forLocalIdentifiers:)"
}
-->

# cloudIdentifierMappings(forLocalIdentifiers:)

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

```
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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)