Skip to content

Expo iCloud StorageiCloud Drive file operations for Expo iOS.

Upload, download, list, delete, and track progress for files in your app's iCloud container, without writing native iOS code.

Expo iCloud Storage
bash
npm install @oleg_svetlichnyi/expo-icloud-storage
ts
import {
  createDirAsync,
  uploadFileAsync,
  downloadFileAsync,
  defaultICloudContainerPath,
} from "@oleg_svetlichnyi/expo-icloud-storage";

await createDirAsync("Exports");

await uploadFileAsync({
  destinationPath: "Exports/export.json",
  filePath: "/path/to/local/export.json",
});

const restoredPath = await downloadFileAsync(
  `${defaultICloudContainerPath}/Documents/Exports/export.json`,
  "/path/to/local/downloads"
);

This module is iOS-only and requires iCloud capability configuration. It does not run in Expo Go because it includes native code.

Use cases

Use the generic file API for JSON exports, app-generated archives, documents, media files, and manual backup or restore flows. SQLite and Realm are recipes built on the same upload/download API, not special database-specific native integrations.

Common questions

Can I use this in a React Native app?

Yes, in a bare React Native iOS app that has Expo Modules installed. It is not a pure React Native native module because the JavaScript bridge and iOS pod use expo-modules-core.

Can I use this in Expo Go?

No. Use an Expo development build, EAS iOS build, prebuild, or a bare iOS app.

Does this sync files automatically?

No. It provides iCloud Drive file operations. iOS controls when files propagate between devices.

Read the full compatibility guide.

Released under the MIT License.