Example Project
Run the example app to see every feature of react-native-cloud-storage in action.
An example project is available within the apps/example directory of the GitHub repository. It demonstrates all functionality the library provides.
iOS Setup
Set expo.ios.bundleIdentifier in apps/example/app.json to an App ID owned by your Apple team. The existing react-native-cloud-storage plugin uses iCloud.<bundleIdentifier> as the container identifier. To use a different container, set iCloudContainerIdentifier in that plugin's options.
Register the App ID and container for your team. Use a provisioning profile that supports them. See Expo installation for plugin options and iCloud setup checks for signing and device settings.
From the repository root, run:
pnpm package build
pnpm example iosAndroid Setup
If you want to set up the example project for Android, you'll need a valid access token for the Google Drive API. You can create one using the Google OAuth 2.0 Playground. Select the following scopes from "Drive API v3":
- https://www.googleapis.com/auth/drive (if you want to use
CloudStorageScope.Documents) - https://www.googleapis.com/auth/drive.appdata
Then generate an authorization code and exchange it for an access token. Once you have the access token, you can make your life easier by using adb shell input text '{some_token}' if you're using an emulator, which feeds the token into it (make sure to tap into the text input field first).