
Product
Rust Support Now in Beta
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
cordova-plugin-widget-center
Advanced tools
This plugin gives you access to the WidgetCenter introduced in iOS14. Use it to retrieve information about widgets that extend your Cordova app or reload their timelines (i.e. dynamic content)
Installation:
cordova plugin add corodova-plugin-widget-center
This plugin was written in Swift and requires Cordova iOS 5.0.0+ or something like cordova-plugin-add-swift-support
to properly build.
For general advice, please refer to Apple's developer information on WidgetCenter and creating widgets in your Xcode project.
The following documentation is adapted to the plugin use from the official docs for your convenience:
To get a list of user-configured widgets, use WidgetCenter.getCurrentConfigurations()
. The retun value conatins the following information:
The kind
string matches the parameter you use when creating the widget's StaticConfiguration
or IntentConfiguration
.
The family
property matches one of the options specified in the supportedFamilies
property of the widget's configuration.
If your widget is based on IntentConfiguration
, the configuration
property provides the custom intent containing the user-customized values for each individual widget.
The return values are only concenated into a string at the moment in this version of the plugin.
Changes in your app's state may affect a widget's timeline. When this happens, you can tell WidgetKit to reload the timeline for either a specific kind of widget or all widgets. For example, your app might register for push notifications based on the widgets the user has configured. When your app receives a push notification that changes the state for one or more of your widgets, requesting a reload of their timelines updates their display.
If you only need to reload a certain kind of widget, you can request a reload for only that kind. For example, in response to a push notification about a change in a game's status, you could request a reload for only the game status widgets:
WidgetCenter.reloadTimelines("com.mygame.gamestatus")
To request a reload for all of your widgets:
WidgetCenter.reloadAllTimelines()
FAQs
Access the iOS WidgetCenter
The npm package cordova-plugin-widget-center receives a total of 0 weekly downloads. As such, cordova-plugin-widget-center popularity was classified as not popular.
We found that cordova-plugin-widget-center demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket's Rust support is moving to Beta: all users can scan Cargo projects and generate SBOMs, including Cargo.toml-only crates, with Rust-aware supply chain checks.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.