0.0.1 • Published 3 years ago

@stryberventures/stryber-rn-core-components-jailbreak-detector v0.0.1

Weekly downloads
3
License
-
Repository
-
Last release
3 years ago

Stryber React Native JailBreakDetector

Description

React Native Component which prevents content to be rendered if device was jailbroken (iOS) or rooted (Android). Jailbreak/root detection is based on "react-native-jailbreak" package.

Installation

Install dependencies

npm i react-native-jailbreak@0.0.1 @stryberventures/stryber-rn-core-components-jailbreak-detector@0.0.1 --save

Usage

import JailBreakDetector from '@stryberventures/stryber-rn-core-components-jailbreak-detector';

//...

const usuallyAppRootComponent = () => {
  return (
    <JailBreakDetector>
      <ApplicationContent/>
    </JailBreakDetector>
  );
}

JailBreakDetector props

interface IJailBreakDetectorProps {
  children: React.ReactNode;
  disableNotification?: boolean;
  notificationTitle?: string;
  notificationMessage?: string;
  onDetected?: () => void;
}