capacitor-shared-store
v1.0.6
Published
Capacitor plugin for sharing key-value data between Android and iOS apps using Content Provider and App Groups.
Readme
capacitor-shared-store
Capacitor plugin for sharing key-value data between Android and iOS apps using Content Provider and App Groups.
Install
npm install capacitor-shared-store
npx cap syncAPI
getItem(...)
getItem(options: { key: string; appGroup: string; }) => Promise<{ value: string | null; }>Lấy giá trị theo key từ App Group
| Param | Type |
| ------------- | ----------------------------------------------- |
| options | { key: string; appGroup: string; } |
Returns: Promise<{ value: string | null; }>
setItem(...)
setItem(options: { key: string; value: string; appGroup: string; }) => Promise<void>Lưu giá trị key-value vào App Group
| Param | Type |
| ------------- | -------------------------------------------------------------- |
| options | { key: string; value: string; appGroup: string; } |
isAppInstalledAndroid(...)
isAppInstalledAndroid(options: { packageName: string; }) => Promise<{ installed: boolean; }>Kiểm tra app đã cài đặt trên Android (chỉ dùng cho Android)
| Param | Type |
| ------------- | ------------------------------------- |
| options | { packageName: string; } |
Returns: Promise<{ installed: boolean; }>
