[BREAKGLASS] Append-only mirror of github.com/bluewallet/react-native-widget-center
Go to file
2023-02-22 22:34:58 -04:00
android Update build.gradle (#17) 2022-09-04 21:25:51 -04:00
example iniital commit 2020-07-20 12:24:47 -07:00
ios Update RNWidgetCenter.swift 2022-03-27 12:19:53 -04:00
.gitignore add arch conditional compilation flags for relase builds 2020-07-24 11:37:23 -07:00
index.d.ts Create index.d.ts 2021-01-08 09:54:24 -08:00
index.js Fix platform version checking 2021-05-31 16:45:22 -07:00
package.json version bump 2022-09-04 21:29:32 -04:00
react-native-widget-center.podspec iniital commit 2020-07-20 12:24:47 -07:00
README.md Add getCurrentConfigurations (#1) 2020-10-14 17:52:23 -07:00

react-native-widget-center

Only supports iOS at the moment

Getting started

$ yarn add react-native-widget-center

Add WidgetKit as optional linked framework

  • Go to your app Build Phases
  • Under Linked Binary with Libraries, add WidgetKit.framework
  • Set WidgetKit.framework Status to Optional

Usage

import RNWidgetCenter from "react-native-widget-center";

// reload specific kind of widget (kind is specified in your WidgetConfiguration)
RNWidgetCenter.reloadTimelines("my.widget.type");

// reload all widget timelines
RNWidgetCenter.reloadAllTimelines();

// get installed widgets configuration
RNWidgetCenter.getCurrentConfigurations().then((result) => {
  // do something
});