Urgent.News

What's breaking now, across thousands of outlets.

Tech

App Store Screenshots Without a Phone: Robolectric, a Fake Image Loader and a Headless Browser

My iPhone apps share their screens with the Android versions, written once in Compose. App Store Connect wants screenshots at 1206x2622 pixels, and I work on a Windows laptop with no iPhone to spare for the job and a limited amount of cloud build minutes that I would rather spend on real builds. So I let unit tests draw the screens. This is how it works, what broke, and what these images honestly…

App developers who share code between iOS and Android can save time by generating screenshots for App Store Connect using an automated process. This method allows them to work on Windows laptops without needing an iPhone or expensive cloud build minutes.

The solution relies on Robolectric, a tool that runs Android code on a desktop JVM, enabling the creation of screenshot images. Roborazzi, a companion tool, saves these bitmap images as PNG files. A single "qualifier" sets the screen size to 1206x2622 pixels, matching the exact dimensions App Store Connect requires.

To accurately represent iPhone screens, the tests add padding for the Dynamic Island and other elements present only on the iOS device. Network images are replaced with real pictures using Coil's FakeImageLoaderEngine, which maps URLs to the appropriate images saved as test resources.

The screenshots capture live content and handle complex components like WebView pages. For WebView displays, the test renders the page HTML in headless Edge and overlays it on a Compose-drawn app bar. Any discrepancies between the Android rendering and iOS appearance are accepted, as the shared UI code remains consistent.

While these generated screenshots provide a useful representation, they are not actual iOS screenshots. The actual behavior of the apps is verified separately on real iPhone devices through TestFlight. The final images are 1206x2622 pixels, determined by a 402dp by 874dp window at xxhdpi scaling.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Debugging an iPhone From Windows Over USB: Screenshots and Logs With Python

On Android, adb makes it easy to take a screenshot or read a log from a phone on your desk. I expected nothing like it for an iPhone on Windows, but there is a way: Apple's own driver package plus an…

  • Install Apple Devices app and Python 3 on Windows
  • Use pymobiledevice3 package to access iPhone from Windows
  • Filter log output by app process name for targeted debugging

Rewriting for Kotlin Multiplatform Without Changing Behavior: Old Code as a Test Oracle

I moved two small RSS reader apps and a space app to Kotlin Multiplatform so they could also run on iOS. That meant rewriting code that leaned on Android and Java classes.

  • Migrated RSS reader apps and space app to Kotlin Multiplatform for iOS compatibility
  • Preserved old implementations in test sources as a test oracle for comparison
  • Developed custom Random algorithm to maintain space app's daily card consistency

What if silence could save your harvest? (I am building BeeBuzz, a bee classifier)

I'm building BeeBuzz for ML Zoomcamp 2026 and it's still rough. The idea: every bee species has a characteristic buzz. If a species goes quiet in an area, you could notice weeks before the flowers…

  • BeeBuzz classifies bee species from unique buzz patterns
  • Dataset of 200 lab recordings with 5 bee species
  • System achieves 80% accuracy, struggles with Centris cinza

More from Monday 16 November →