RORK LABJP
FUNDING — Rork raises a $15M seed led by Left Lane CapitalRORK MAX — Rork Max generates native Swift apps instead of React NativePLATFORM — It targets iPhone, iPad, Watch, and Vision Pro, reaching Live Activities and Core MLGROWTH — Traffic keeps climbing at 743K monthly visits and 85% growthTEST — The Companion app lets you test on a real device without a paid Apple Developer accountSTACK — Built on React Native and Expo for true native experiences, not web wrappersFUNDING — Rork raises a $15M seed led by Left Lane CapitalRORK MAX — Rork Max generates native Swift apps instead of React NativePLATFORM — It targets iPhone, iPad, Watch, and Vision Pro, reaching Live Activities and Core MLGROWTH — Traffic keeps climbing at 743K monthly visits and 85% growthTEST — The Companion app lets you test on a real device without a paid Apple Developer accountSTACK — Built on React Native and Expo for true native experiences, not web wrappers
Articles/App Dev
App Dev/2026-06-30Advanced

Screening Images On Device Before They Appear — Notes on SensitiveContentAnalysis

Implementation notes on blocking inappropriate images before they render, right on the device, for apps that handle AI-generated or user-submitted photos. Covers calling Apple's SensitiveContentAnalysis framework from Swift and wiring it into Rork Max native code or an Expo native module, with the pitfalls I actually hit.

SensitiveContentAnalysisRork Max195Expo127iOS89Content Moderation2

Premium Article

I run a few wallpaper apps as an indie developer, and I was adding a feature that lets people upload and edit their own photos. As long as I was only serving curated assets, this was a non-issue. The moment user submissions and AI-generated images entered the gallery, the risk of an inappropriate image sitting in the grid became very real.

My first instinct was to handle everything with server-side moderation. But once I traced the actual paths — the brief window between upload and the image reaching another user's feed, and the offline path where a cached image is re-displayed on the device — server-side checks alone clearly left gaps. So I added one more layer: "check it once, inside the device, right before it is shown." Apple's SensitiveContentAnalysis framework is built precisely for that role. Here is what I learned wiring it in.

Why screen "before display" and "on device"

When people think about inappropriate-image defense, they think of server-side checks at upload time. That is correct, but mobile apps have these leak paths:

  • The image reaches another user's feed before the server-side check finishes
  • A cached or saved image is re-displayed offline
  • A widget or share-sheet preview that loads a remote URL directly

App Store Review Guideline 1.2 expects apps with user-generated content to provide a filtering mechanism and a way to report. If you run ads such as AdMob, an ad rendered next to an inappropriate image is itself a policy problem. So this is not only about passing review — it is also a defensive move for revenue.

If the server check is the first line of defense, the on-device check at display time is the last gate. After I moved to this two-layer setup, both review feedback and user reports noticeably calmed down.

What the SensitiveContentAnalysis framework is

SensitiveContentAnalysis arrived in iOS 17 (macOS 14) as the official framework for deciding, on the device, whether an image or video contains explicit nudity. Key traits:

  • Analysis runs entirely on device; the image is never sent anywhere. Privacy stays intact
  • Apple maintains the detection engine, so you never train or update a model yourself
  • It requires the dedicated entitlement com.apple.developer.sensitivecontentanalysis.client
  • Crucially, analysis only runs on devices where the user has enabled "Sensitive Content Warning" in Settings. When it is off, the analysis policy is .disabled and no judgment happens

That last point dominates the design. The premise that "adding this API guarantees every device blocks bad images" is false, and holding that fact from the start is what leads to the fallback design below.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
Working Swift code that flags explicit images entirely on device (iOS 17+) using SCSensitivityAnalyzer, without sending anything off the phone
A concrete path for wiring the check into Rork Max native code or into an Expo Modules API native module called from TypeScript
The judgment calls for fallback design — what to do on devices where the feature is off, and in the simulator where it never runs
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Rork Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

App Dev2026-06-29
Clipboard UX in Expo apps — copy and paste without flooding users with iOS's paste banner
When you wire up copy and paste with expo-clipboard, iOS's paste permission banner can fire constantly and quietly erode trust. Here's exactly when the banner appears, and how hasStringAsync lets you gate a Paste button without ever reading the contents.
App Dev2026-06-28
Building a Live Barcode and Text Scanner in Rork Max with VisionKit's DataScanner
Add a live barcode and text scanner to your Rork Max native Swift app using VisionKit's DataScanner. Covers the SwiftUI bridge, availability handling, throttling repeated detections, and on-device verification with working code.
App Dev2026-06-16
Staging Wallpaper Packs Before the First Launch: Where Rork Max and Background Assets Fit
Content-heavy apps tend to greet new users with an empty grid. Background Assets downloads content out-of-band, ahead of the first launch. Here is how I implement it in Rork Max's native Swift, a domain Rork (Expo) cannot reach easily, plus how I decide when it is worth it.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →