◉RORK LABJP
●GPT-6.1 SOL — Added to Rork's model menu (09-29) with Low, Medium and High effort; included on Pro and Max●SONNET 5.5 — Claude Sonnet 5.5 is selectable: strong at UI design and faster than Sonnet 5 (09-28)●SDK 58 — Beta since 09/15 with no stable date yet; running projects in Expo Go has required login since 09/03●WIDGET — A write-up traces an iOS widget that renders black only in production builds●OBSERVE — EAS Observe now records native crashes too (SDK 57.0.21 or later, 10/07)●NEW — My App Open Ad Only Showed When the App…●GPT-6.1 SOL — Added to Rork's model menu (09-29) with Low, Medium and High effort; included on Pro and Max●SONNET 5.5 — Claude Sonnet 5.5 is selectable: strong at UI design and faster than Sonnet 5 (09-28)●SDK 58 — Beta since 09/15 with no stable date yet; running projects in Expo Go has required login since 09/03●WIDGET — A write-up traces an iOS widget that renders black only in production builds●OBSERVE — EAS Observe now records native crashes too (SDK 57.0.21 or later, 10/07)●NEW — My App Open Ad Only Showed When the App…
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 Max236Expo219iOS116Content Moderation

✦ 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-10-15
When adjustsFontSizeToFit Shrinks Just One Row, Suspect the Box Height, Not the String
Only the 10th row of a list drops to 4pt on iOS, though the data and strings are fine. I read the Yoga rounding and font-fit sources, then counted how often the box comes up short in Node.
◈ Getting Started2026-09-08
Whether You Need Rork Max Is Answered by Your Permissions, Not the Price Page
When I cannot decide between standard Rork and Rork Max, I stop reading the price page. Instead I pull every OS capability my app actually asks for out of app.json and Info.plist, then sort them into what Expo covers, what a config plugin covers, and what truly needs native Swift.
◇ App Dev2026-10-15
When Only EAS Build Fails with "No matching variant", Check Your Local android/build First
Gradle passes on your machine, but the Android build on EAS stops at "No matching variant of project". Reading the reports on GitHub, I traced how a Windows-generated autolinking cache can reach the Linux builder, and wrote a small script that checks for it before you queue a build.