npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@approov/approov-service-react-native

v3.5.17

Published

Approov Mobile App Protection for ReactNative

Readme

Approov Service for React Native

React Native Android iOS npm Approov SDK Message Signing CI

A wrapper for the Approov SDK to enable easy integration when using React Native for making the API calls that you wish to protect with Approov using fetch() or similar. In order to use this you will need a trial or paid Approov account.

Table of Contents

Adding the Approov Dependency

Add the Approov service layer to your existing app with:

npm install @approov/approov-service-react-native

If you experience an error related to peer dependencies, append --force to install with your particular React Native version. The plugin supports version 0.76 or above.

For Expo projects use:

expo install @approov/approov-service-react-native

Manifest / Project Changes

For iOS you must install pod dependencies. Change to the ios directory and run:

pod install

Do not worry if this generates warnings about duplicate UUIDs.

Initializing Approov

Import the service layer:

import { ApproovProvider, ApproovService } from '@approov/approov-service-react-native';

Initialize explicitly during startup and keep a correlation id in your app logs:

const approovSessionId = global.crypto?.randomUUID?.() || `${Date.now()}-${Math.random()}`;

async function initializeApproov() {
  try {
    await ApproovService.initialize('<enter-your-config-string-here>');

    const enabled = await ApproovService.isApproovEnabled();
    if (enabled) {
      const deviceId = await ApproovService.getDeviceID();
      console.log('Approov initialized', { approovSessionId, deviceId });
    } else {
      console.warn('Approov initialized without active protection', { approovSessionId });
    }
  } catch (error) {
    console.warn('Approov initialization failed; continuing unprotected', {
      approovSessionId,
      error,
    });
    await ApproovService.initialize('');
  }
}

If you prefer component-wrapped startup, wrap your application with ApproovProvider after applying any setup calls:

const approovSetup = () => {
};

return (
  <ApproovProvider config="<enter-your-config-string-here>" onInit={approovSetup}>
    <View>
      <Button onPress={callAPI} title="Press Me!" />
    </View>
  </ApproovProvider>
);

The config string is provided in your Approov onboarding email.

Using Approov

Once initialization succeeds, network requests may have Approov tokens, message signatures, dynamic pinning, or secure substitutions applied. Initially you will not have set which API domains to protect, so requests are unchanged, but the service will contact the Approov cloud and log UNKNOWN_URL (Android) or unknown URL (iOS).

Support is provided for the rn-fetch-blob networking stack through the @approov/rn-fetch-blob fork:

npm uninstall rn-fetch-blob
npm install @approov/rn-fetch-blob

Checking It Works

You may use the ApproovMonitor component, also imported from @approov/approov-service-react-native, inside ApproovProvider. This outputs console logging on the state of Approov initialization.

During initial rollout and whenever you add observability SDKs, capture ApproovService.getPinningDiagnostics() metadata in your app logging:

  • Android: fetch the metadata immediately before the first protected request and verify isInterceptorPresent and isPinnerPresent. If either is false, call ApproovService.updateClientFactory(true) before proceeding.
  • iOS: fetch the metadata immediately after the first protected request and inspect sessionsWithoutPinning and unpinnedSessions. This helps detect delegate conflicts, skipped sessions, and missing pinning verification early in development and staging.

On Android, use logcat and filter with adb logcat | grep ApproovService. On iOS, use the Console app for a connected simulator or device and search for ApproovService.

Your Approov onboarding email should contain a link to Live Metrics Graphs. After you run your app with Approov integration you should see results in live metrics within a minute or so.

Next Steps

  • Read ARCHITECTURE.md for the service layer's network interception design on iOS and Android, race conditions, interference from third-party SDKs, and the fetchWithApproov alternative.
  • Read USAGE.md for detailed instructions on message signing, token binding, custom network mutators, API protection, and secrets protection.
  • Read REFERENCE.md for the complete React Native ApproovService interface.
  • Read TROUBLESHOOTING.md for platform-specific setup and runtime diagnostics.
  • See the Quickstart sample application for a working integration.