@serebano/capacitor-icloud-preferences
v0.1.1
Published
Capacitor plugin for iCloud key-value sync
Readme
@serebano/capacitor-icloud-preferences
Capacitor plugin for iCloud key-value sync
Install
npm install @serebano/capacitor-icloud-preferences
npx cap syncAPI
set(...)get(...)remove(...)setContainer(...)configureSyncKeys(...)addListener('icloudSyncComplete', ...)removeAllListeners()- Interfaces
- Type Aliases
set(...)
set(options: { key: string; value: any; }) => Promise<void>| Param | Type |
| ------------- | ----------------------------------------- |
| options | { key: string; value: any; } |
get(...)
get(options: { key: string; }) => Promise<{ value: any; }>| Param | Type |
| ------------- | ----------------------------- |
| options | { key: string; } |
Returns: Promise<{ value: any; }>
remove(...)
remove(options: { key: string; }) => Promise<void>| Param | Type |
| ------------- | ----------------------------- |
| options | { key: string; } |
setContainer(...)
setContainer(options: { identifier: string; }) => Promise<void>| Param | Type |
| ------------- | ------------------------------------ |
| options | { identifier: string; } |
configureSyncKeys(...)
configureSyncKeys(options: { keys: string[]; }) => Promise<void>| Param | Type |
| ------------- | -------------------------------- |
| options | { keys: string[]; } |
addListener('icloudSyncComplete', ...)
addListener(eventName: 'icloudSyncComplete', listenerFunc: (data: Record<string, any>) => void) => Promise<PluginListenerHandle>| Param | Type |
| ------------------ | ------------------------------------------------------------------------------- |
| eventName | 'icloudSyncComplete' |
| listenerFunc | (data: Record<string, any>) => void |
Returns: Promise<PluginListenerHandle>
removeAllListeners()
removeAllListeners() => Promise<void>Interfaces
PluginListenerHandle
| Prop | Type |
| ------------ | ----------------------------------------- |
| remove | () => Promise<void> |
Type Aliases
Record
Construct a type with a set of properties K of type T
{ [P in K]: T; }
