NaturalCam

NaturalCam/Tutorials

How this camera is built

NaturalCam is a small app with an unusual number of decisions in it. These are the ones worth writing down — real code from the app, and the reasoning that produced it, rather than a tour of an API that already has documentation.

The series

One idea, one article.

Tutorial 04 · Core Image

A long exposure on iOS, built from one-second frames

iOS caps any third-party app's exposure at one second, on every iPhone. Summing frames in linear light for a longer exposure, averaging them for a quieter one, and the streaming accumulator that stacks 32 RAWs without ever holding more than one in memory.

  • Core Image
  • AVFoundation
  • Memory
  • iOS 17
  • 10 min
Tutorial 03 · System integration

Get your camera app into iOS's Camera Control list

A Locked Camera Capture extension is necessary and not sufficient. What CameraCaptureIntent actually does, why the intent must be compiled into three targets or fail silently, how to reach an extension that shares no storage with your app — and the entitlement that does not exist, which costs people a day.

  • AppIntents
  • LockedCameraCapture
  • WidgetKit
  • iOS 18
  • 11 min
Tutorial 01 · Controls

How to build a circular slider in SwiftUI

The arcs that carry shutter speed, ISO and focal length, built from nothing in ten steps: rung-to-angle maths, why dragging is absolute rather than accumulated, hit testing an annulus so the shutter button keeps its own touches, the left-handed mirror, and detent haptics. With the control running in the page and the whole file to download.

  • SwiftUI
  • Shape
  • DragGesture
  • Haptics
  • Accessibility
  • 12 min
Tutorial 02 · RAW

RAW vs JPEG on iPhone: what RAW actually buys you

Bayer RAW vs Apple ProRAW — a distinction Apple's own naming obscures — what the extra bit depth and re-developability are actually for, why JPEG and HEIF are still the right call most of the time, and why NaturalCam bakes that choice into its modes instead of a settings toggle.

  • AVFoundation
  • RAW
  • DNG
  • Workflow
  • 8 min
Next

More, as they are written

The queue is the rest of the interesting parts: the develop pipeline itself — demosaic and colour rendering with Apple's processing switched off — and the film-look LUTs. Nothing is listed here until it exists.

Why these exist

Written from the source, not around it.

Every listing in these articles is code that ships in the app, or a distilled version of it that compiles on its own. Where a number looks arbitrary — 110 degrees of sweep, 141 points of reach, a scale floor of 0.62 — the article says where it came from, because that is the part you cannot get from a screenshot.

They are also honest about the failures. The label-placement algorithm is greedy because the arithmetic one printed 105 and 135 on top of a native 100, and that is in the article rather than quietly fixed.

The app

One frame, no processing.

NaturalCam takes one Bayer RAW frame from one locked physical lens and develops it with Apple's processing switched off — no Smart HDR, no Deep Fusion, no sharpening, no noise reduction. The controls these articles describe are how you drive it.