Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
react-native-widget-bridge
Advanced tools
Readme
A bridge between JS thread and native widget, initially created for sharing data and communication with ios 14 widget
Currently, it's support ios 14 Android will be supported soon
npm install react-native-widget-bridge
import WidgetBridge from "react-native-widget-bridge";
const result = await WidgetBridge.multiply(3, 7);
// Always ensure that suite was ready to read/write before interact with it
const success: Bool = await WidgetBridge.ensureUserDefaultsSuit("group.my.exampe.com");
// If suite has been ready, write to UserDefaults suite
const success: Bool = await WidgetBridge.setDict("MyDictA", {a: 1, b:2, foo: "bar"});
const dict: object = await WidgetBridge.getDict("MyDictA");
const success: Bool = await WidgetBridge.removeObject("MyDictA");
const success: Bool = await WidgetBridge.setString("MyStringB", "This is a test string");
const str: String = await WidgetBridge.getString("MyStringB");
const success: Bool = await WidgetBridge.removeObject("MyStringB");
// Reload widget timeline after your's UserDefaults data was changed
const myWidgetKind = "my_widget"
WidgetBridge.reloadWidget(myWidgetKind)
You can get the myWidgetKind
by looking into your widget entry file:
@main
struct my_widget: Widget {
let kind: String = "my_widget"
...
}
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
FAQs
A bridge between JS thread and native widget, initially created for sharing data and communication with ios 14 widget
The npm package react-native-widget-bridge receives a total of 222 weekly downloads. As such, react-native-widget-bridge popularity was classified as not popular.
We found that react-native-widget-bridge 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
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.