Coder Social home page Coder Social logo

mirego / react-native-killswitch Goto Github PK

View Code? Open in Web Editor NEW
3.0 22.0 1.0 633 KB

The official React Native implementation of Mirego’s killswitch

Home Page: https://open.mirego.com

License: BSD 3-Clause "New" or "Revised" License

JavaScript 14.05% TypeScript 74.80% Makefile 11.15%
killswitch react-native

react-native-killswitch's Introduction

React Native Killswitch is a library built by Mirego that allows mobile developers to apply
runtime version-specific behaviors to their React Native application.



What is Killswitch?

Killswitch is a clever control panel built by Mirego that allows mobile developers to apply runtime version-specific behaviors to their iOS or Android application.

Installation

npm install react-native-killswitch

Usage

The bare minimum needed to have a working killswitch is API keys for iOS and Android, the app language and the app version:

import { useKillswitch } from 'react-native-killswitch';

const { isOk } = useKillswitch({
  iosApiKey: iosApiKey,
  androidApiKey: androidApiKey,
  language: myAppLanguage,
  version: myAppVersion,
});

Options

  • iosApiKey A string taken from your killswitch back-end. The killswitch back-end will use this to send the correct behavior to your iOS users.

  • androidApiKey A string taken from your killswitch back-end. The killswitch back-end will use this to send the correct behavior to your Android users.

  • language A language code like "en" or "de". The killswitch back-end will use this to send a localized message to your users.

  • version A version number like "1.0.0". The killswitch back-end will use this to send the correct behavior to your users.

  • apiHost The host of the killswitch back-end.

  • useNativeUI Use native alerts to display messages. Defaults to true

  • timeout A number of milliseconds to wait for the back-end before returning isOk = true. Defaults to 2000

License

react-native-killswitch is © 2023 Mirego and may be freely distributed under the New BSD license. See the LICENSE.md file.

The shield logo is based on this lovely icon by Kimmi Studio, from The Noun Project. Used under a Creative Commons BY 3.0 license.

About Mirego

Mirego is a team of passionate people who believe that work is a place where you can innovate and have fun. We’re a team of talented people who imagine and build beautiful Web and mobile applications. We come together to share ideas and change the world.

We also love open-source software and we try to give back to the community as much as we can.

react-native-killswitch's People

Contributors

charlesdemers avatar dependabot[bot] avatar garno avatar madumo avatar remi avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

garno

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.