> ## Documentation Index
> Fetch the complete documentation index at: https://docs.portalhq.io/llms.txt
> Use this file to discover all available pages before exploring further.

# configureICloudStorage

> Configure iCloud backup storage.

## Function Signature

```dart theme={null}
Future<void> configureICloudStorage()
```

## Description

Configures iCloud backup storage. This must be called before using iCloud for backup or recovery operations.

<Note>
  This method is only available on iOS. It will have no effect on Android.
</Note>

## Parameters

This method takes no parameters.

## Returns

**`void`**

## Example

```dart theme={null}
import 'package:portal_flutter/portal_flutter.dart';

final portal = Portal();

// Configure iCloud storage
await portal.configureICloudStorage();

// Now you can use iCloud backup
final response = await portal.backupWallet(
  method: PortalBackupMethod.iCloud,
);
```

## Setup Requirements

1. Enable iCloud capability in your Xcode project
2. Enable iCloud Keychain
3. Configure your App ID in the Apple Developer Portal

See the [iCloud backup options guide](../../../resources/backup-options/icloud) for detailed setup instructions.

## Errors

| Code                   | Description                        |
| ---------------------- | ---------------------------------- |
| `NOT_INITIALIZED`      | Portal was not initialized         |
| `CONFIGURATION_FAILED` | Failed to configure iCloud storage |

## Related

* [Back up a wallet guide](../guide/back-up-a-wallet)
* [backupWallet](./backupwallet)
* [configureGoogleStorage](./configuregooglestorage)
* [configurePasskeyStorage](./configurepasskeystorage)
