@portal-hq/icloud-storage
v4.0.3
Published
Portal's iCloud storage adapter
Downloads
524
Readme
Portal iCloud backup storage
The @portal-hq/icloud-storage
package contains a storage adapter intended for use with the @portal-hq/core
package.
This storage adapter allows end users to save backup MPC shares to their iCloud filesystem.
NOTE: This storage provider is only supported on iOS devices, so should not be used as your sole backup storage adapter unless you are explicitly releasing an iOS only app.
Basic usage
Install the package in your React Native project.
yarn add @portal-hq/icloud-storage # OR # npm install --save @portal-hq/icloud-storage
Import the package into the component where you initialize the Portal class
import Portal from '@portal-hq/core' import ICloudStorage from '@portal-hq/icloud-storage'
Register your storage adapter and initialize the Portal class
const portal = new Portal({ // ...your other config options backup: { icloud: new ICloudStorage(), }, })
Setting up iCloud Backups in your iOS app
- Open your project in XCode.
- Navigate to
Signing & Capabilities
:
- Click the
+
Button right below it, scroll down and selectiCloud
.
- Under iCloud Services select
Key-value storage
.