Introduction to React Native Cloud Storage
mainReact Native Cloud Storage provides a developer-friendly API for using iCloud (iOS only) and Google Drive as file and data storage in React Native applications. The API is modeled after Node's fs and AsyncStorage to minimize the learning curve.
Core Capabilities
- File Storage: Use an
fs-like API includingreadFile,writeFile,appendFile,readdir,mkdir,stat, andunlink. - Key-Value Storage: Save preferences and small app states using native iCloud key-value storage or an emulated Google Drive store.
- Unified API: Use the same methods regardless of the provider (iCloud or Google Drive).
- Scopes: Choose between
AppData(hidden, app-private container) orDocuments(user-visible folder). - React Hooks: Access reactive values for files, key-value state, and provider availability using
useCloudFile,useCloudKV, anduseIsCloudAvailable. - Modern Architecture: Built as a Turbo Module and fully typed with TypeScript.