0.1.1 • Published 8 months ago

capacitor-widgetsbridge-plugin v0.1.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

capacitor-widgetsbridge-plugin

Capacitor plugin to interact with ios widgetkit

Demo

Screenshot1

Install

npm install capacitor-widgetsbridge-plugin
npx cap sync

API

getItem(...)

getItem(options: UserDefaultsOptions) => Promise<DataResults<any>>

Return the value from user’s defaults database associated with the specified key

ParamType
optionsUserDefaultsOptions

Returns: Promise<DataResults<any>>

Since: 0.0.1


setItem(...)

setItem(options: UserDefaultsOptions) => Promise<DataResults<boolean>>

Set the value to user’s defaults database associated with the specified key

ParamType
optionsUserDefaultsOptions

Returns: Promise<DataResults<boolean>>

Since: 0.0.1


removeItem(...)

removeItem(options: UserDefaultsOptions) => Promise<DataResults<boolean>>

Remove the value from user’s defaults database associated with the specified key

ParamType
optionsUserDefaultsOptions

Returns: Promise<DataResults<boolean>>

Since: 0.0.1


reloadAllTimelines()

reloadAllTimelines() => Promise<DataResults<boolean>>

Reloads the timelines for all configured widgets belonging to the containing app

Returns: Promise<DataResults<boolean>>

Since: 0.0.1


reloadTimelines(...)

reloadTimelines(options: TimelinesOptions) => Promise<DataResults<boolean>>

Reloads the timelines for all widgets of a particular kind

ParamType
optionsTimelinesOptions

Returns: Promise<DataResults<boolean>>

Since: 0.0.1


getCurrentConfigurations()

getCurrentConfigurations() => Promise<DataResults<any>>

Get current widget configurations

Returns: Promise<DataResults<any>>

Since: 0.0.1


Interfaces

DataResults

PropTypeDescriptionSince
resultsTHolds response results from native code0.0.1

UserDefaultsOptions

PropTypeDescriptionSince
keystringThe key whose value to retrieve from storage.0.0.1
groupstringUser defaults database name which holds and organizes key/value pairs0.0.1
valuestringThe value to set in storage with the associated key0.0.1

TimelinesOptions

PropTypeDescriptionSince
ofKindstringA string that identifies the widget and matches the value you used when you created the widget’s configuration0.0.1