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

@rick427/react-native-developer-mode

v1.1.0

Published

A lightweight React Native library to detect if developer mode is enabled on Android and iOS.

Readme

react-native-developer-mode

npm version npm downloads license GitHub stars

TypeScript React Native Java Objective-C++

iOS Android


A simple, lightweight React Native library that detects whether Developer Mode (Android Developer Options / iOS Developer Mode) is active on the device — including real-time detection while the app is running.


Features

  • ✅ Android: Detects Developer Options and USB debugging (ADB)
  • ✅ iOS 16+: Detects Developer Mode via Apple's DeviceCheck framework
  • ✅ Real-time listener — catches users who enable dev mode while the app is open or backgrounded
  • ✅ Zero dependencies
  • ✅ Fully typed (TypeScript)
  • ✅ Promise-based async API

Installation

npm install @rick427/react-native-developer-mode
# or
yarn add @rick427/react-native-developer-mode

iOS

cd ios && pod install

Android

No extra steps required — the module is auto-linked.


Usage

One-shot read

import { isDeveloperModeEnabled, checkDeveloperMode } from '@rick427/react-native-developer-mode';

// Full result object
const result = await isDeveloperModeEnabled();
console.log(result.isDeveloperModeEnabled); // true | false
console.log(result.isAdbEnabled);           // true | false (Android only)

// Simple boolean helper
const isDevMode = await checkDeveloperMode();
console.log(isDevMode); // true | false

Real-time listener

Subscribe to changes so your app reacts the moment a user enables developer mode — even if they do it while the app is backgrounded.

import { useEffect } from 'react';
import { addDeveloperModeListener } from '@rick427/react-native-developer-mode';

useEffect(() => {
  const subscription = addDeveloperModeListener((result) => {
    if (result.isDeveloperModeEnabled) {
      // warn the user, log the event, or take protective action
      console.warn('Developer mode was enabled!');
    }
  });

  // Always clean up to avoid memory leaks
  return () => subscription.remove();
}, []);

API

isDeveloperModeEnabled(): Promise<DeveloperModeResult>

Reads the current state once. Returns a promise that resolves with:

| Field | Type | Description | |---|---|---| | isDeveloperModeEnabled | boolean | Whether Developer Options (Android) or Developer Mode (iOS 16+) is enabled | | isAdbEnabled | boolean | Whether USB debugging (ADB) is enabled. Android only — always false on iOS |

checkDeveloperMode(): Promise<boolean>

Convenience helper. Resolves to true if developer mode is active on the current platform.

addDeveloperModeListener(callback): EmitterSubscription

Subscribes to real-time developer-mode state changes. Returns an EmitterSubscription — call .remove() to unsubscribe.

| Parameter | Type | Description | |---|---|---| | callback | (result: DeveloperModeResult) => void | Called whenever the developer-mode state changes |


Platform behaviour

| Scenario | Android | iOS | |---|---|---| | App open, dev mode toggled | ✅ Fires immediately via ContentObserver | ⚠️ Fires on next foreground | | App backgrounded, dev mode toggled, app foregrounded | ✅ Fires immediately on toggle | ✅ Fires on foreground | | App cold-started after dev mode was already on | ✅ One-shot read returns true | ✅ One-shot read returns true |

Android uses a ContentObserver on the system settings URI — it fires the instant the value changes in the settings database, regardless of app state.

iOS has no system-level callback for this setting. The listener re-checks DCDevice.currentDevice.developerModeEnabled every time the app comes back to the foreground and only emits if the value changed.


Platform Notes

Android

Reads the following system settings (no permissions required):

  • Settings.Global.DEVELOPMENT_SETTINGS_ENABLED — whether Developer Options is turned on
  • Settings.Global.ADB_ENABLED — whether USB debugging is enabled

Requires API 16 (Android 4.1) or above.

iOS

Uses DCDevice.currentDevice.developerModeEnabled from Apple's DeviceCheck framework.

  • iOS 16+: Returns the real value from the system.
  • iOS < 16: Returns false (Developer Mode did not exist as a setting before iOS 16).

Authors


License

MIT © Richard Njoku