CLAUDE LABJP
MODEL — Claude Opus 4.8 lands, improving coding, agentic, and reasoning over 4.7 at the same priceCODE — Opus 4.8's Fast mode runs at 2.5x speed and is now three times cheaper than earlier modelsCODE — Auto-mode command classification expands, with denial tracking and live bash path autocompleteENTERPRISE — Connector permissions in custom roles let admins control which tools each role can useTEAM — Tag Claude directly in Slack and hand off tasks while you focus elsewhereMCP — MCP servers now show startup auth notices, making connection status easier to trackMODEL — Claude Opus 4.8 lands, improving coding, agentic, and reasoning over 4.7 at the same priceCODE — Opus 4.8's Fast mode runs at 2.5x speed and is now three times cheaper than earlier modelsCODE — Auto-mode command classification expands, with denial tracking and live bash path autocompleteENTERPRISE — Connector permissions in custom roles let admins control which tools each role can useTEAM — Tag Claude directly in Slack and hand off tasks while you focus elsewhereMCP — MCP servers now show startup auth notices, making connection status easier to track
Articles/Claude Code
Claude Code/2026-06-30Advanced

Fixing Blurry Wallpapers on New iPhones with Claude Code: Safely Growing a Per-Device Resolution Map

Why wallpapers go blurry or letterboxed on brand-new iPhones, and how to collapse scattered device branches into a single source of truth you can extend in one line — walked through as a real Claude Code refactor with before/after code.

Claude Code173iOS23Swift5wallpaper app2refactoring4indie developer17

Premium Article

The weekend a new iPhone shipped, I got a report on my wallpaper app, Beautiful HD Wallpapers, that one new device showed a faint band above and below the image. Reproducing it in the simulator confirmed it: on the new model only, the wallpaper sat centered with the background color filling the top and bottom. The cause was mundane — the code that decides each device's resolution didn't know the new screen size, so it fell back to "the nearest old device" and served an image whose aspect ratio didn't match.

A wallpaper app lives or dies on one thing: serving the exactly correct pixel resolution for each device. Get the aspect ratio even slightly wrong and you either upscale into softness or letterbox into empty bands. Yet after years of updates, that decision had scattered itself across the codebase. Here's how I collapsed that sprawl into a single table with Claude Code, so a new device now takes one line — with the actual code along the way.


Why "nearest height" quietly breaks

Start with the precise root cause. An iOS screen is two-layered: logical points and physical pixels. UIScreen.main.bounds returns points; the real pixel count is that multiplied by nativeScale (3.0 on most recent devices). A wallpaper image has to line up with those physical pixels, or the system rescales it and softens the result.

In my app, the branch that picks an image size or layout constant per device had been appended to, screen by screen, with every new model — ending up as 29 ternary expressions. The typical shape:

// ❌ Before: matching by screen "height" alone
// branches like this multiplied across the app with each new device
func wallpaperPixelHeight() -> CGFloat {
    let h = UIScreen.main.bounds.height
    if h >= 932 {          // meant to be "Pro Max class"
        return 2796
    } else if h >= 852 {   // meant to be "standard Pro"
        return 2556
    } else if h >= 844 {
        return 2532
    } else {
        return 2436        // fall back to older devices
    }
}

This has two weaknesses. First, when a new model's height lands in a gap between thresholds, it gets sucked into an unintended branch. Second, the only axis is height, so a device with a different aspect ratio gets treated as identical to a same-height device. For wallpapers the second one is fatal: even a few points of width difference at the same height means the image is slightly stretched or letterboxed.

The band on the new iPhone was exactly that — a device "close in height but different in width" was handled as an old device.


First, have Claude Code list every branch

The plan is clear: gather the scattered branches into one place, switch the axis from height to the screen's point size (a width/height pair), and change selection from "nearest height" to "exact size match, then closest aspect ratio." But rewriting blind would miss one of the 29 sites. The first job is to know the full set precisely.

This is where Claude Code helps. Asking it to find the branches semantically is faster and leakier than hand-grepping. I asked:

List every place in this repo that branches on UIScreen.main.bounds
height/width or UIDevice model name. Give me a table of file path,
line number, and what each branch switches (image size / inset /
font etc.). Do not make any changes yet.

The "do not make any changes yet" matters. Claude Code will happily rewrite everything at once, but a refactor is safer in the order understand → design → replace → verify. The returned list showed that of the 29 sites, 6 switched image size and the rest were insets or safe-area constants. That told me to carve out the image-size decision first.


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
Understand why wallpapers go soft or letterboxed only on new iPhones, and ship a fix that matches by aspect ratio instead of nearest height in your own app
Learn how to safely fold 20–30 scattered device-branching ternaries into one source-of-truth table using Claude Code, with before/after Swift
Rebuild the logic so a new device takes a single new line, and catch any miss with a snapshot test that fails loudly
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

Claude 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

Claude Code2026-06-04
Clearing Crashlytics 'Missing dSYM' Warnings with Claude Code: A Field Memo
Right after moving Firebase to SPM, my Crashlytics reports stopped symbolicating and showed raw addresses. Here is how I narrowed down the Missing dSYM cause with Claude Code and rebuilt an upload path that does not break again.
Claude Code2026-05-23
Three Months of Letting Claude Code Handle the Monthly Content Refresh for My Four Wallpaper Apps
Starting in February 2026 I began handing off the monthly content refresh of my wallpaper apps — Beautiful HD Wallpapers and three sibling titles — to Claude Code. After three months I want to share what kinds of judgement I felt comfortable delegating, and where I deliberately kept my own hands on the work.
Claude Code2026-05-18
Running Apple Privacy Manifest as an Indie Developer — Catching Dependency Drift with Claude Code
Apple Privacy Manifest (PrivacyInfo.xcprivacy) is a quietly painful area for indie iOS developers. Drawing on twelve years of running iOS apps with over 50 million combined downloads, this article walks through how I use Claude Code to detect drift, respond to rejections, and bake the whole flow into CI.
📚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 →