---
title: "cloudIdentifiers(forLocalIdentifiers:)"
framework: photos
role: symbol
role_heading: Instance Method
path: "photos/phphotolibrary/cloudidentifiers(forlocalidentifiers:)"
---

# cloudIdentifiers(forLocalIdentifiers:)

Retrieves the equivalent iCloud identifiers for the list of local identifiers.

## Declaration

```swift
func cloudIdentifiers(forLocalIdentifiers localIdentifiers: [String]) -> [PHCloudIdentifier]
```

## Parameters

- `localIdentifiers`: The local identifiers for which to retrieve iCloud identifier equivalents.

## Return Value

Return Value The array of corresponding iCloud identifiers.

## Discussion

Discussion Retrieving iCloud identifiers can be an expensive operation, so you should perform this lookup sparingly. Instead, work with local identifiers and retrieve their iCloud identifier equivalents only once: either after loading from or before saving to persistent storage.

## See Also

### Converting Between Local and iCloud Identifiers

- [cloudIdentifierMappings(forLocalIdentifiers:)](photos/phphotolibrary/cloudidentifiermappings(forlocalidentifiers:).md)
- [localIdentifierMappings(for:)](photos/phphotolibrary/localidentifiermappings(for:).md)
- [PHCloudIdentifier](photos/phcloudidentifier.md)
- [localIdentifiers(for:)](photos/phphotolibrary/localidentifiers(for:).md)
- [PHLocalIdentifierNotFound](photos/phlocalidentifiernotfound.md)
