GEMINI LABJP
SUNSET — Two days until the image models shut down: imagen-4.0-generate-001, ultra, fast, and the Gemini 3 Image family stop on August 17BREAKING — This is not a drop-in swap. The generate_images() method disappears entirely, and image generation moves to generate_content(), the same call used for textHARD — On the cutoff date, calls fail with a hard error rather than a deprecation warning, so waiting it out is not an optionMIGRATE — The deprecations table points to gemini-3.1-flash-image as the recommended replacementROBOTICS — Gemini Robotics ER 2 is now publicly available, with stronger video understanding, task orchestration, multi-robot collaboration, and safetyLOGS — Developer logs for the Interactions API can now be viewed from the AI Studio dashboardSUNSET — Two days until the image models shut down: imagen-4.0-generate-001, ultra, fast, and the Gemini 3 Image family stop on August 17BREAKING — This is not a drop-in swap. The generate_images() method disappears entirely, and image generation moves to generate_content(), the same call used for textHARD — On the cutoff date, calls fail with a hard error rather than a deprecation warning, so waiting it out is not an optionMIGRATE — The deprecations table points to gemini-3.1-flash-image as the recommended replacementROBOTICS — Gemini Robotics ER 2 is now publicly available, with stronger video understanding, task orchestration, multi-robot collaboration, and safetyLOGS — Developer logs for the Interactions API can now be viewed from the AI Studio dashboard
Articles/Dev Tools
Dev Tools/2026-08-15Intermediate

Before Adding New iPhone Widths, I Had Gemini Write Out the Branches I Already Had

Adding three new screen widths to four apps turned into an extraction job, not a rewrite. Here is why I let Gemini pull the branch table out of the source and kept every pass/fail decision in deterministic code.

gemini104structured-output24ios13indie-dev45

Premium Article

I opened DefineManager.h, started typing one more ternary, and stopped.

Three widths to add: 420pt for iPhone Air, 402pt for iPhone 17 Pro, 440pt for the new Pro Max. A ten-minute job on paper. Except the same shape of branch was scattered across four apps, and I could not honestly say which edits would cover all of them.

As an indie developer, the apps I have shipped the longest are the ones with the most of these quiet accumulations.

The decision: write the table out before rewriting anything

There were two reasonable moves.

  1. Drop the ternaries, move width-to-value pairs into a lookup table, and collapse the logic into one place
  2. Touch nothing, extract the scattered branches into a table, and machine-check them for coverage

I picked the second one, for three reasons.

  • Rewriting four apps at once stacks all the risk into one week. If App Store review queues overlap, rolling back gets narrow fast
  • Extraction changes zero lines of shipping code. Being wrong costs nothing
  • I did not actually have the information needed to decide whether consolidation was worth it. Designing before seeing the full picture is the wrong order

The rewrite could wait until there was a table to look at.

29 ternaries, spread across four apps

The wallpaper and relaxation apps I publish on the App Store and Google Play switch padding and column counts based on screen width. After years of shipping, those checks had piled up in a constants header as ternaries — 29 of them.

Here are the widths in play, in portrait points.

StatusWidth (pt)Notes
Existing375 / 390 / 393Compact through standard
Existing414 / 428 / 430Plus and Pro Max family
New402iPhone 17 Pro
New420iPhone Air
New440New Pro Max size

Once I laid them out, the scary part was not the additions. Forgetting one does not crash anything. It ships a slightly wrong layout, quietly.

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
You'll be able to decide where to start safely when a new device lands and your width checks are scattered across files
You'll be able to draw a clear line in your own pipeline between work an LLM should do and work that must stay deterministic
You'll be able to catch the quiet case where an existing threshold swallows a new width, instead of only checking for missing branches
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

Gemini 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

Dev Tools2026-08-10
Finding the questions your help docs never answer, by asking Gemini to write the quiz
When support keeps asking something your help page already covers, generate questions from that page and check whether the page alone can answer them. A two-pass audit pipeline with call design and cost math.
Dev Tools2026-05-11
A Week Using Gemini CLI for iOS App Development: An Indie Dev's Honest Report
An indie developer with 50M+ app downloads shares a week-long experiment integrating Gemini CLI into iOS development. Covers translation, release notes, code review, and an honest comparison with Claude Code.
Dev Tools2026-07-02
After the One-Click Deploy — Hardening an AI Studio Gemini App on Cloud Run for Real Production Use
AI Studio's one-click deploy to Cloud Run gives you a working URL in minutes — but not a production service. A practical checklist for API key storage, authentication, cost ceilings, and observability, with copy-paste gcloud commands.
📚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 →