#530

fix(ios): keep the launch screen's pictures small enough for the iPhone to draw

OpenZhehanZhangwants to merge intofrom

Summary of changes

The launch screen's bear is drawn at 2x instead of 3x, so each launch picture is about as light for iOS as the old launch screen's bear was.

  • The bear picture goes from 1524 by 1010 pixels to 1016 by 673. Its cut-out (Poki/LaunchArt/LaunchBear.png) is only 1024 pixels wide, fewer than the 1254 a 418-point bear has at 3x. So the 3x picture held more pixels but no more detail, and the two look the same on a 3x screen.
  • The word stays at 3x. The light (402 by 874 at 1x) is unchanged.
  • make-launch-art.swift takes a scale for each picture, and make-assets.sh writes the bear's image set at 2x. The storyboard's resource size and the LaunchArt README are updated to match.
  • New LaunchScreenTests.testLaunchPicturesStaySmall checks that each launch picture fits in one 4 MiB piece of the asset catalogue.

Motivation (Closes #N)

This is the cold launch blocker for 0.4.6 from #529. On a real iPhone, a cold launch shows a plain screen first, and the launch screen designed in #520 only shows once Poki is running.

What I checked:

  • The 0.4.6 Pre-alpha (1900) IPA, built from d5711d2, has all three pictures in Assets.car under the names the storyboard uses. Its UILaunchStoryboardName is LaunchScreen, and the compiled storyboard names the same three images. So the pictures are in the build. The gap is in how the iPhone draws the launch screen.
  • iOS draws the launch screen on the device ahead of time, before any of Poki's code runs. #520 was checked in the Simulator only.
  • The old launch screen drew on iPhones with one picture, 408 by 408 pixels. The new one adds a full-screen light and a 1524 by 1010 bear. That bear is the largest picture in the app, and the only one the catalogue splits into two 4 MiB pieces.
  • Developers have reported launch screens that did not draw their picture until it was made smaller (for example https://developer.apple.com/forums/thread/665358). Apple documents no limit.

This is the most likely cause, but it is not confirmed. If a phone still shows the plain screen with this build, the next thing to try is the light. Without its grain it is about a fifth of its current weight, and the grain would fade in with the live light during the hand-over.

Part of #529.

Test plan

  • Not built or run yet. The asset script and the test need macOS.
  • I drew the bear picture at 3x and at 2x and compared them at a 3x phone's pixels. They look the same. The 2x edges are only slightly softer, and only when zoomed in.
  • Still owed: a build, LaunchScreenTests, and a cold launch on a physical iPhone, both on the first launch after installing over 0.4.5 and on a later launch.

Screenshots or screen recording

Owed with the phone check.

AI assistance: Claude Code. I have reviewed and understand these changes.

Activity

3
JosssphZhou2d ago

Thank you for checking the artwork itself. We’d like to keep the dark appearance in a follow-up using the standalone PNGs. Could you check the smaller bear on an iPhone after an upgrade and on a later cold launch?