Software · 2026

Nik

An iOS short-form video app — pick a template, auto-fill it from your camera roll, export a 9:16 cut. It runs on a custom Core Image/Metal video compositor I wrote after Apple's standard export path turned out to be broken.

SwiftAVFoundationMetalVisionStoreKit 2

What it is

A short-form video templating app in the CapCut mold: browse a template, let it auto-fill from your camera roll, add text and on-device auto-captions, and export a 9:16 cut for TikTok, Reels, or Shorts. SwiftUI + AVFoundation, iOS 17+, and zero third-party dependencies — every hard part is built, not imported.

The engineering

A compositor, because Apple's was broken

Apple's standard AVVideoCompositionCoreAnimationTool export path crashes in the iOS 26 Simulator. Rather than route around it, I wrote a custom AVVideoCompositing compositor on Core Image with a Metal-backed CIContext — which also unlocked filters and true crossfades the standard path never supported.

On-device smart crop

Vision samples three frames per template slot and runs face detection + saliency (faces weighted 3×) to choose the 9:16 pan point — with a user override and a centered fallback when it isn't confident.

Exports you can verify

A Maestro end-to-end flow drives launch → pick template → fill four slots → export → share, and the output is checked with ffprobe as a valid 1080×1920 H.264/AAC MP4. The test asserts the artifact, not the UI.

Shipping surface, pre-ship

StoreKit 2 subscriptions wired with real product IDs, on-device SFSpeechRecognizer captions, and a competitive teardown of 12+ apps done before a line of code — which set product rules like “never gate a completed export.”

The bug I'm proudest of finding

Exports were failing with cryptic -11800 / -12780 OSStatus codes. The root cause: a two-pass build was deallocating source AVURLAssets too early — the asset was gone by the time the second pass read from it. Fixed by explicitly retaining the source assets in SlotInfo. Chasing a lifetime bug through an opaque Apple error code is the kind of debugging that doesn't show up in a feature list.

Status

Prototype / early v2 — 27 Swift files, ~5,100 lines. StoreKit pricing is wired, but it is not on the App Store. I'm showing it for the compositor and the Vision crop, not as a shipped product.