Security News
Highlights from the 2024 Rails Community Survey
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
react-native-widget-bridge
Advanced tools
A bridge between JS thread and native widget, initially created for sharing data and communication with ios 14 widget
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
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.
Security News
A record 2,709 developers participated in the 2024 Ruby on Rails Community Survey, revealing key tools, practices, and trends shaping the Rails ecosystem.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.