Skip to content

Getting Started

react-native-shield is a unified TurboModule package providing essential mobile security features for React Native apps on iOS and Android.

Requirements

  • React Native 0.73+ (New Architecture / TurboModules)
  • iOS 14+
  • Android API 24+

Installation

sh
npm install @think-grid-labs/react-native-shield
# or
yarn add @think-grid-labs/react-native-shield
# or
pnpm add @think-grid-labs/react-native-shield

iOS Setup

sh
cd ios && pod install

TrustKit (SSL pinning) and DeviceCheck (attestation) are linked automatically via CocoaPods.

Android Setup

No extra steps needed. com.google.android.play:integrity is bundled automatically.

Quick reference

typescript
import {
  isRooted,
  isEmulator,
  isDebuggerAttached,
  verifySignature,
  isHooked,
  isDeveloperModeEnabled,
  isVPNDetected,
  getRootReasons,
  protectClipboard,
  authenticateWithBiometrics,
  getBiometricStrength,
  addSSLPinning,
  updateSSLPins,
  preventScreenshot,
  setSecureString,
  getSecureString,
  removeSecureString,
  getAllSecureKeys,
  clearAllSecureStorage,
  requestIntegrityToken,
} from '@think-grid-labs/react-native-shield';

Run security checks early — before rendering any sensitive UI or making authenticated network requests:

typescript
import { isRooted, isEmulator, isHooked, isDebuggerAttached } from '@think-grid-labs/react-native-shield';

const runSecurityGate = () => {
  if (isRooted() || isEmulator() || isHooked() || isDebuggerAttached()) {
    // Block sensitive operations or terminate the session
    return false;
  }
  return true;
};

What's included

ModuleGuide
Device Integrity & Anti-TamperingGuide
Platform AttestationGuide
SSL / Certificate PinningGuide
Biometric AuthenticationGuide
Secure StorageGuide
UI PrivacyGuide
App Environment (VPN, Clipboard)Guide

Released under the MIT License.