Skip to content

iOS: permission prompts in both languages, and copy that says Face ID or Touch ID - #135

Merged
juancguerrerodev merged 3 commits into
mainfrom
dbejarano820/128-ios-copy
Nov 27, 2026
Merged

juancguerrerodev merged 3 commits into
mainfrom
dbejarano820/128-ios-copy

Conversation

@dbejarano820

Copy link
Copy Markdown
Contributor

What and why

Closes #128

On an iPhone, the system permission prompts were Expo's English defaults, and the app's copy said "fingerprint" and gave Android's restricted-settings steps. This puts the iOS prompts in packages/copy in both locales, names the biometric by platform (Face ID or Touch ID on an iPhone, fingerprint on Android), and hides Android-only hints on iOS.

  • Permission prompts. New keys common.ios.faceIdUsage, common.ios.calendarsUsage and common.ios.remindersUsage. A config plugin, apps/mobile/plugins/with-ios-purpose-strings.js, reads them from packages/copy, writes the English text into Info.plist (replacing what expo-secure-store and expo-calendar would write), and sets locales, so prebuild writes en.lproj and es.lproj InfoPlist.strings. A missing key fails the prebuild. It's listed before those plugins because mods run last-listed first, so its text is what stays.
  • Biometric name. About 100 strings that named the fingerprint now use {biometric}, {biometricStart} or {aBiometric}. createTranslator(dict, defaults) fills placeholders a call doesn't pass, and biometricWords(dict, kind) reads the words from common.biometric.*. The app sets the kind once at startup (applyBiometricName): Android gets fingerprint. An iPhone gets Face ID or Touch ID from supportedAuthenticationTypesAsync, and "Face ID or Touch ID" when it reports neither. A few sentences were reworded so they read right with every word and in Spanish (no gender agreement with "huella"). The strings that said Android retired a key now say the key was retired. A hash's fingerprint (SHA-256, SHA-1, the action's hash) and the Device lab copy (HM-SET-10, changed in another PR) are unchanged.
  • Android-only hints. showsRestrictedHelp(platform) in packages/runtime. On iOS, the onboarding permissions step and What Hermit can use don't show the restricted-settings steps, and reminders don't show the exact-alarm hint.

Known limit: on an iPhone, the kind is read asynchronously at launch. A screen drawn before that read finishes keeps "fingerprint" until it renders again. In practice the read finishes long before any screen that names the biometric.

Size: about 590 changed non-test lines, over the 400 guide. Most of it is the two locale files (about 430 lines, a one-for-one rewording). If you'd rather have it split: (1) the purpose-strings plugin plus hiding the Android-only hints (about 120 lines), then (2) the biometric wording (the rest).

Vision fit

Hermit speaks Spanish and English from day one, and says plain, true things. On an iPhone that means system prompts in the user's language and a name for the biometric the phone actually has.

Non-negotiables

  • This keeps every non-negotiable in AGENTS.md as it is.
  • Or it changes one, and this is the accepted RFC: #

Approvals, the cage and the hard limits are unchanged. Only the words naming the biometric changed. Sheets still show only code-written copy.

Checklist

  • It closes one issue, linked above, or it's a small fix (a typo, a broken link, a wrong comment). A feature has an accepted proposal.
  • I wrote the failing test first. It fails without this change and passes with it.
  • These pass: pnpm check:privacy, pnpm typecheck, pnpm lint, pnpm test and node scripts/guard/check.mjs --patterns scripts/guard/patterns.txt.
  • No new network call, telemetry, analytics, ads or crash reporting. (A new request in an app adapter is explained below, with its host, skill and risk.)
  • No new dependency, or the reason for each one is below.
  • Every UI string is in packages/copy, in es-419 and en, with matching keys and placeholders, and no em or en dashes.
  • Tests, fixtures and screenshots use made-up data only.

Tests written first, and how they failed before the code:

  • packages/copy/test/copy.test.ts: the iOS purpose strings exist in both locales; every biometric kind has every form; Android says fingerprint and an iPhone says Face ID or Touch ID; every string using the placeholders renders for every iOS kind with no "fingerprint", "huella" or "Android" left; no copy outside the Device lab names the fingerprint directly, except a hash's. Before: 5 failed (IOS_PURPOSE_KEYS, BIOMETRIC_KINDS, biometricWords missing, and HM-APPR-01.approve: expected 'Approve with fingerprint' not to match /fingerprint/i).
  • packages/runtime/test/settings-view.test.ts: an iPhone gets no restricted-settings or exact-alarm help. Before: showsRestrictedHelp is not a function.
  • apps/mobile/src/biometric-name.test.ts: the kind by OS and supported types. Before: module not found.
  • apps/mobile/plugins/ios-purpose-strings.test.mjs: every purpose key the plugins write has copy in both locales. It runs Expo's Info.plist mods with expo-secure-store, expo-local-authentication and expo-calendar and checks no default survives, and that app.json lists the plugin first. Before: common.ios.faceIdUsage in en, packages/copy has no common.ios.faceIdUsage, and listed failed.
  • Changed tests: mode-view.test.ts, pay-copy.test.ts and w1-replies.test.ts read the raw copy, so they now expect {biometric}. Their test translators fill it the way the app's does.

Prebuild proof (CI=1 npx expo prebuild -p ios --no-install), the generated files:

Hermit/Supporting/en.lproj/InfoPlist.strings
"NSFaceIDUsageDescription" = "Hermit uses Face ID to approve what it sends or pays for you, to open your vault and wallet, and for the app lock.";
"NSCalendarsUsageDescription" = "Hermit reads your calendar to answer about your plans, and adds the events you ask for.";
"NSCalendarsFullAccessUsageDescription" = "Hermit reads your calendar to answer about your plans, and adds the events you ask for.";
"NSRemindersUsageDescription" = "Hermit keeps its reminders in the app and doesn't need your Reminders list. You can say no.";
"NSRemindersFullAccessUsageDescription" = "Hermit keeps its reminders in the app and doesn't need your Reminders list. You can say no.";

Hermit/Supporting/es.lproj/InfoPlist.strings
"NSFaceIDUsageDescription" = "Hermit usa Face ID para aprobar lo que envía o paga por ti, para abrir tu bóveda y tu billetera, y para el bloqueo de la app.";
"NSCalendarsUsageDescription" = "Hermit lee tu calendario para responder sobre tus planes, y agrega los eventos que le pides.";
"NSCalendarsFullAccessUsageDescription" = "Hermit lee tu calendario para responder sobre tus planes, y agrega los eventos que le pides.";
"NSRemindersUsageDescription" = "Hermit guarda sus recordatorios en la app y no necesita tu lista de Recordatorios. Puedes decir que no.";
"NSRemindersFullAccessUsageDescription" = "Hermit guarda sus recordatorios en la app y no necesita tu lista de Recordatorios. Puedes decir que no.";

Hermit/Info.plist
NSCalendarsFullAccessUsageDescription  Hermit reads your calendar to answer about your plans, and adds the events you ask for.
NSCalendarsUsageDescription            Hermit reads your calendar to answer about your plans, and adds the events you ask for.
NSFaceIDUsageDescription               Hermit uses Face ID to approve what it sends or pays for you, to open your vault and wallet, and for the app lock.
NSRemindersFullAccessUsageDescription  Hermit keeps its reminders in the app and doesn't need your Reminders list. You can say no.
NSRemindersUsageDescription            Hermit keeps its reminders in the app and doesn't need your Reminders list. You can say no.

Before this change the same Info.plist had Expo's "Allow $(PRODUCT_NAME) to access your calendars" (and the reminders and Face ID equivalents) and no locales. Hermit doesn't read the iOS Reminders list, so its prompt says so. expo-calendar declares the key anyway.

Model path

  • This doesn't touch the model path: packages/model, agent, skills or eval, the prompt, the router, tool descriptions, normalizers, examples or the model file.
  • It does. The eval numbers from before and after are below, run as docs/evals.md says. No held-out case was tuned on.

Screenshots

  • No UI change.
  • UI change. Each changed screen is below, in both themes and both languages, with made-up data.

Screenshots to come, taken on the phone (iPhone and Android). Screens to capture: the iOS Face ID and calendar system prompts (es and en); onboarding permissions (HM-ONB-04) with notifications denied; What Hermit can use (HM-SET-09) on both platforms; an approval sheet (HM-APPR-01); the vault (HM-VAULT-01); and the wallet with its key (HM-PAY-01).

Light Deep sea
es-419 to come to come
en to come to come

New dependencies and network calls

n/a. No new dependency. expo-local-authentication is already a dependency; supportedAuthenticationTypesAsync is a local OS call.

AI agents

  • No AI agent wrote any part of this.
  • An AI agent helped. Which one, and what it did: Claude Code (Claude Opus 5.5) wrote the tests, the plugin, the copy changes and this description, and ran the gates and the iOS prebuild.
  • I read and ran everything in this pull request, and I can explain it.

…#127)

On iOS, expo-file-system resumes only from the base64 resume data NSURLSession
produces on a pause, and .part does not exist until the file is complete, so
every stopped download started again from zero.

- download-resume.ts (pure, tested): which path each platform takes, the record
  kept next to .part, and when to fall back to a clean restart.
- The download screen pauses the running download on iOS when the app goes to
  the background or the connection drops; the pause saves the resume data in
  <name>.part.resume, and the next attempt resumes from it. A missing, stale or
  rejected record means one clean restart.
- partialModel and the model update read the saved bytes on iOS.
- Android keeps its byte offset path. The SHA-256 check is unchanged.

Signed-off-by: Daniel Bejarano <dbejarano820@gmail.com>
…the form (#130)

On an iPhone with the GitHub app, the github.com link opens in the app,
which drops the query, so the report never reached the form. File it on
GitHub now copies the exact report with the plain local copy every time,
then lets the system open the link with its default handler (the GitHub
app or the browser), on Android and iOS. The screen says the report is
copied, to paste it into the Report field if the form opens empty, and
to pick Device report if the app shows a list. The too-long path says
the same. The decision lives in fileReport() in device-lab-view.ts,
tested under node --test.

Signed-off-by: Daniel Bejarano <dbejarano820@gmail.com>
… or Touch ID

The iOS permission prompts come from packages/copy (common.ios.*). A config plugin,
plugins/with-ios-purpose-strings, writes the English text into Info.plist in place of the defaults
expo-secure-store and expo-calendar would write, and sets `locales`, so prebuild writes en.lproj and es.lproj
InfoPlist.strings. A missing key fails the prebuild.

Strings that named the fingerprint now use {biometric}, {biometricStart} or {aBiometric}. createTranslator takes
defaults, and the app fills them from common.biometric.*: fingerprint on Android, Face ID or Touch ID on an iPhone
(from supportedAuthenticationTypesAsync), and "Face ID or Touch ID" when the phone reports neither. The few of
those strings that said Android retired a key now say the key was retired. A hash's fingerprint and the Device lab
copy are unchanged.

The restricted-settings steps and the exact-alarm hint are Android's: an iPhone no longer shows them, on the
onboarding permissions step or in What Hermit can use.

Closes #128

Signed-off-by: Daniel Bejarano <dbejarano820@gmail.com>
@juancguerrerodev
juancguerrerodev marked this pull request as ready for review November 27, 2026 19:45
@juancguerrerodev
juancguerrerodev self-requested a review as a code owner November 27, 2026 19:45
@juancguerrerodev
juancguerrerodev force-pushed the dbejarano820/128-ios-copy branch from a9cb5c6 to 8ca2b67 Compare November 27, 2026 19:45
@juancguerrerodev
juancguerrerodev merged commit 8ca2b67 into main Nov 27, 2026
4 checks passed
@juancguerrerodev
juancguerrerodev deleted the dbejarano820/128-ios-copy branch November 27, 2026 19:51
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.

iOS: permission prompts in both languages, and copy that says Face ID instead of fingerprint

2 participants