Skip to content

iOS release bundles custom fonts (MOB-480) - #139

Merged
GenericJam merged 3 commits into
masterfrom
fix/MOB-480-ios-release-fonts
Oct 14, 2026
Merged

GenericJam merged 3 commits into
masterfrom
fix/MOB-480-ios-release-fonts

Conversation

@GenericJam

Copy link
Copy Markdown
Owner

Fixes MOB-480. Found by the Codex review of the 0.7.25 release, which ships style fonts (MOB-476).

mix mob.release --ios built the .app from the binary and ios/Info.plist alone, so an App Store build shipped no custom fonts: not the app's priv/fonts/, not plugin or style assets.fonts. Themes that name a custom font rendered the system font.

Change

  • NativeBuild.ios_font_copies!/1 is the dev build's copy plan + collision check, now shared with the release. It also refuses names the dev XML merge can't carry intact (&, <, >, control characters).
  • Release.ios_fonts_release_env/2 (from release_env/4) passes the fonts to release_device.sh as base64 (MOB_IOS_FONT_FILES, MOB_IOS_UI_APP_FONTS). Existing UIAppFonts entries are read with plutil (binary plists and XML-escaped names work).
  • The script copies each font to the .app root and appends missing names with plutil -insert … -append; each name is one argument, so quotes, apostrophes and backslashes are exact.
  • CHANGELOG, decision record, AGENTS.md rule ("custom fonts are bundled on every native build path").

Verification

  • test/mob_dev/release_fonts_test.exs: runs the real script block with bash/base64/plutil and compares with the dev merge (macOS), plus the release_env/4 wiring and name checks (run on Linux CI). Each fix was mutation-checked: reverting it fails its test.
  • Full suite: 3072 passed (macOS), 3034 with --exclude macos_only.
  • Real signed mix mob.release --ios of an app whose style ships 9 fonts: the IPA's .app has all 9 (byte-identical), all 9 in UIAppFonts, codesign -v --strict OK.

Review: Codex, three rounds. Rounds 1–2 DO NOT SHIP (PlistBuddy quoting, tab/newline in paths, regex plist parsing, tests bypassing the wiring, regex literals, macOS-only tests); all fixed. Round 3: no source findings, DO NOT MERGE only pending CI on this commit.

mix mob.release --ios built the .app from the binary and ios/Info.plist
alone, so an App Store build shipped none of the app's priv/fonts, plugin
or style fonts. release_device.sh now copies the fonts the dev build
bundles (NativeBuild.collect_all_fonts/0, through the shared
ios_font_copies!/1 collision check) to the .app root and appends the
missing names to UIAppFonts, from env computed by
Release.ios_fonts_release_env/2.

Also records that rejecting a non-font assets key in a v1 style manifest
is an accepted upgrade break (CHANGELOG, decision record).
…list with plutil, test the release_env wiring

- ios_font_copies!/1 (dev and release) rejects bundle names with ", \, &, <, >
  or control characters: PlistBuddy dropped " and \ and exited 0, and the
  dev merge wrote them into the plist XML unescaped.
- Existing UIAppFonts are read with plutil, so a binary Info.plist and an
  XML-escaped name don't produce duplicate entries.
- release_fonts_test runs release_env/4 from a project dir, so dropping the
  fonts from the release env fails a test.
…ux-run tests

- Names reach UIAppFonts through plutil -insert as one argument, so quotes,
  apostrophes and backslashes are exact (PlistBuddy parsed them and still
  exited 0). Env values are base64, so any source path survives.
- The name check (dev and release) now refuses only what the dev XML merge
  can't carry: &, <, > and control characters. Runtime-compiled regexes only.
- Only the tests that run bash/plutil are :macos_only; the release_env/4
  wiring and name tests run on Linux CI.
@GenericJam
GenericJam merged commit 4eaee16 into master Oct 14, 2026
6 checks passed
GenericJam added a commit that referenced this pull request Oct 14, 2026
…undles custom fonts (MOB-480); Android relabels otp/ before the ERTS probe (MOB-478)

Release-gate review of 0.7.24..a1933e1: Codex DO NOT SHIP (iOS release
bundled no fonts; style assets upgrade note). Fixed in MOB-480 (#139, Codex
three rounds, final no source findings, CI green) and the CHANGELOG/decision
note. Verified from the packed Hex tarball on a rooted Android emulator
(reinstall + native deploy), the iOS simulator (9 style fonts bundled), and a
signed mix mob.release --ios IPA (9 fonts + UIAppFonts, codesign OK).
@GenericJam
GenericJam deleted the fix/MOB-480-ios-release-fonts branch October 14, 2026 03:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant