React-Native library for the WidgetKit framework. Integrate a Widget into your App 🍏📱

Overview

react-native-widgetkit

widgetkit

React-Native Library for the iOS 🍏 WidgetKit framework

widget_small widget_medium widget_small

Table of Contents 📚

Introduction 👨‍🏫

This library allows you to call essential methods from the iOS "WidgetKit Framework", which are needed when developing a widget. For example updating the widget timelines

🚨 To be on the safe side: This library exposes API functionality of WidgetKit. The widgets themselves must be developed natively in SwiftUI.

Installation 🖇‍

npm install react-native-widgetkit

Usage 👨🏻‍💻

import { reloadAllTimelines } from 'react-native-widgetkit';

// ...

reloadAllTimelines();

Methods 📖‍

reloadAllTimelines()

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


reloadTimelines(ofKind: String)

Reloads the timelines for all widgets of a particular kind.


WidgetKit.setItem(String key, String value, String appGroup)

Writes Key-Value to UserDefaults database.


WidgetKit.getItem(String key, String appGroup)

Reads Value from UserDefaults database.


Contributors 🤓

Thomas Leiter

Thomas Leiter

License 🔖

MIT License

Copyright (c) 2020 Thomas Leiter, Fasky OG

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Issues
  • Cannot find 'WidgetCenter' in scope

    Cannot find 'WidgetCenter' in scope

    Hi all,

    we found a compile problem only when we try to compile with Release Schema on the Simulator.
    As in the screenshoot the problem is "Cannot find 'WidgetCenter' in scope" If we try to run our app with Debug Schema on Simulator/Device it works well, and also if we try to run with Release Schema on real Device it works well.. the problem seems to be only when we run with Release Schema on the Simulator.

    Can you help us ? We have: react-native: 0.60.6

    Screenshot 2021-03-11 at 16 05 20

    opened by goriverna 4
Owner
Fasky
Fasky
🤖 React Native Android widgets bridged to JS, a proof of concept

React Native Android Widget Proof Of Concept ?? Using React Native and having Android widgets is possible. Create buttons in Java / Android XML to tri

Netbeast 186 Sep 21, 2021
React Refresh Token with JWT and Axios Interceptors example

Buid React JWT Refresh Token example with Axios Interceptors - Refresh Token in React.js, Axios silent refresh JWT token example

null 18 Sep 30, 2021
React-Godfather aims to explore an alternative mental model for function components.

React-Godfather "Look ma, no Hooks!" React-Godfather aims to explore an alternative mental model for function components. It adds a thin layer between

John Kapolos 17 Sep 20, 2021
HTML to React parser that works on both the server (Node.js) and the client (browser):

HTML to React parser that works on both the server (Node.js) and the client (browser):

Mark 1k Oct 19, 2021
A simple Facebook Chat Head like bubble for react native

react-native-floating-bubble A simple Facebook Chat Head like bubble for react native. Special thanks to bubble-for-android because this is just react

null 109 Oct 14, 2021
Because your state management code should be domain-agnostic.

Because your state management code should be domain-agnostic.

Zachary DeRose 3 Oct 6, 2021
Declarative hotkey and focus area management for React

React HotKeys A declarative library for handling hotkeys and focus areas in React applications. Upgrading from 1.*.* ? See the upgrade notes. Looking

Aleck Greenham 1.9k Oct 3, 2021
🌊🐷 Utility for generalized composition of React components

???? Utility for generalized composition of React components

Enki 279 Oct 4, 2021
A lightweight react library that converts raw HTML to a React DOM structure.

A lightweight react library that converts raw HTML to a React DOM structure.

Arve Knudsen 652 Oct 17, 2021
A component for React that utilizes the Counterpart module to provide multi-lingual/localized text content.

React Translate Component Translate is a component for React that utilizes the Counterpart module and the Interpolate component to provide multi-lingu

Martin Andert 325 Apr 14, 2021
A ReactJS password recovery box component built using the FluentUI library

A ReactJS password recovery box component built using the FluentUI library

Boia Alexandru 2 Sep 20, 2021
Flatten a React "pyramid of doom" by composing multiple layers into a single component.

Flatten a React "pyramid of doom" by composing multiple layers into a single component.

new Chris(A) 4 Oct 5, 2021
Article converter is an api for getting a extended html version of the content attribute provided by Article API.

Article converter is an api for getting a extended html version of the content attribute provided by Article API.

NDLA 2 Oct 6, 2021
The next generation state management library for React

The next generation state management library for React

Bytedance Inc. 150 Sep 18, 2021
A Fetch Library Support React New Suspense SSR

use-suspense-fetch A data fetching library for React Suspense. inspired by use-asset Feature use LRU Cache support create custom cache support React 1

Snake 6 Jul 12, 2021
CSS media queries for React

react-media react-media is a CSS media query component for React. A <Media> component listens for matches to a CSS media query and renders stuff based

React Training 2.4k Oct 15, 2021
Utility Components for determining whether elements are in the center of the screen.

@n1ru4l/react-in-center-of-screen Utility Components for determining whether elements are in the center of the screen. Codesandbox Quick Demo: https:/

Laurin Quast 12 May 29, 2021
Extended utils for ⚛️ React.Children data structure that adds recursive filter, map and more methods to iterate nested children.

React Children Utilities Recursive and extended utils for React children opaque data structure. Installation Available as a package and can be added t

Fernando Pasik 183 Oct 5, 2021
Detect device, and render view according to detected device type.

react-device-detect Detect device, and render view according to the detected device type. Installation To install, you can use npm or yarn: npm instal

Michael Laktionov 1.6k Oct 14, 2021