explaingit

watadarkstar/react-native-nsfw-detector

Analysis updated 2026-05-18

13JavaScriptAudience · developerComplexity · 2/5LicenseSetup · moderate

TLDR

An offline React Native library for iOS that detects nudity in images on the device itself, using Apple's CoreML with no internet connection needed.

Mindmap

mindmap
  root((NSFW Detector))
    What it does
      On device detection
      No internet needed
      Confidence score 0 to 1
    Tech stack
      React Native
      Expo
      CoreML
    Use cases
      Auto flag unsafe images
      Moderate user uploads
      Add safety checks
    Audience
      Mobile developers
      iOS app builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Automatically flag or blur unsafe images before they are shown in a mobile app.

USE CASE 2

Moderate user uploaded photos in an iOS app without sending images to any server.

USE CASE 3

Add an on device content safety check to a React Native or Expo project.

What is it built with?

React NativeExpoCoreMLiOS

How does it compare?

watadarkstar/react-native-nsfw-detector09catho/axonabdulrdeveloper/react--tic-tac-toe
Stars131313
LanguageJavaScriptJavaScriptJavaScript
Setup difficultymoderatemoderateeasy
Complexity2/54/51/5
Audiencedeveloperresearcherdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Only works reliably on a real iPhone or iPad running iOS 13 or newer, not the simulator.

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

This is a library for mobile app developers building iOS apps with React Native or Expo. It checks whether an image contains nudity or other unsafe visual content, and it does that check entirely on the device, with no internet connection required. The underlying technology is Apple's CoreML, which lets apps run trained AI models locally on an iPhone or iPad. The way it works is straightforward: you pass the library a path to an image, and it returns a confidence score between 0 and 1. A score above 0.9 means the image is likely unsafe. A score below that suggests it is safe to display. You call one function, get one number back, and decide what to do with it. There are no accounts, no API keys, and no data sent to any server. The library requires iOS 13 or newer, React Native version 0.70 or above, and a real iPhone or iPad for accurate results. The README warns clearly that running on the iOS Simulator produces unreliable scores, so testing on a physical device is necessary. Xcode 10 or above is also required because the built-in AI model was created with Apple's CreateML tool. Setup follows the standard pattern for React Native packages: install via npm or yarn, then run your app. The repository includes a working example Expo app in the example directory if you want to see a full integration before writing your own. The project is MIT licensed and credits the original NSFWDetector library by the LOVOO organization as the foundation for the detection model.

Copy-paste prompts

Prompt 1
Show me how to install react-native-nsfw-detector in my Expo iOS app and check an image for unsafe content.
Prompt 2
Help me set a confidence threshold using this library's score to decide when to hide an image.
Prompt 3
Explain why I need to test this NSFW detector on a real iPhone instead of the simulator.
Prompt 4
Walk me through the example Expo app included in this repository.

Frequently asked questions

What is react-native-nsfw-detector?

An offline React Native library for iOS that detects nudity in images on the device itself, using Apple's CoreML with no internet connection needed.

What language is react-native-nsfw-detector written in?

Mainly JavaScript. The stack also includes React Native, Expo, CoreML.

What license does react-native-nsfw-detector use?

Use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is react-native-nsfw-detector to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is react-native-nsfw-detector for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.