Skip to main content

Mobile development · Advanced · 27 min

Get the Larkfield app ready for release: accessibility, versions and a Maestro smoke test

By Padding · Updated 18 Nov 2026
Expo SDK 58 · React Native 0.88 · EAS CLI 27.11 · Maestro CLI 2.12.1 · Node.js 26 (node:26 image)

You will take the Larkfield Clinic Expo app through a release checklist, with tested accessible slot buttons, a version policy EAS enforces, the icon, splash and permissions checked by one script, and a Maestro flow that books an appointment, then hand it to EAS and clean up the series.

On this page

The Larkfield Clinic app can now book, store, sync, remind, open from links and test itself. Before anyone outside the team installs it, it needs the dull work that decides whether a release goes smoothly: patients who use a screen reader or large text can still book, the version numbers will not clash with the stores, the icon and splash belong to the clinic, every permission is explained or removed, and one end-to-end run proves a booking works in the built app.

This part turns that into a checklist you can rerun before every release. Most of it ends up in two files you keep: a Jest test for the accessibility rules of the busiest screen, and scripts/release-check.mjs, which reads the final app configuration and prints OK, WARN or FAIL per item. A Maestro flow covers the booking on an emulator. The store build itself is handed to build and submit an app with EAS, and the last step deletes the demo project.

Step 1 · Make the time slots usable with a screen reader and large text

The "Choose a time" screen, src/app/(tabs)/book/[serviceId].tsx from part 1, is the busiest part of the app: a card per practitioner with a row of small buttons. It is also where accessibility usually fails. A screen reader reads the printed label "Wed 2 Dec, 09:30" with its abbreviations, a slot that is already taken cannot be shown at all, and a chip sized only by its text is hard to hit with a thumb on a moving bus.

Write the slot as one component with these rules built in:

  • accessibilityRole="button" and an accessibilityLabel written to be heard, not read: something like "2 December at 9:30, Dr Chidi Okafor" rather than "Wed 2 Dec, 09:30".
  • accessibilityState carries selected and disabled, so the state is spoken instead of shown only by colour: VoiceOver says "selected" and "dimmed", and TalkBack says "selected" and "disabled". A full slot also says "Full" in text and has a dashed border.
  • At least 48 high, which meets Apple's 44 by 44 point guidance and Android's 48 by 48 dp, plus hitSlop so a near miss still counts.
  • Text grows with the phone's font size. The one exception is the time label, which sits in a three-column grid: at the largest sizes 09:30 no longer fits its column and splits across lines, which reads as two numbers. maxFontSizeMultiplier={1.6} caps that one label. Everything else keeps scaling and wraps.

The data module from part 1 holds each slot as { id, label }, where the label is a fixed string. A spoken label needs a real date to format, and a full slot needs a flag. Add both to src/data/clinic.ts: a startsAt time with the clinic's UTC offset, and full on the one slot that is already taken. The label stays, because part 2 passes it to the details screen. This script edits the five slots in place and stops with an error if your file does not match part 1:

Bash
cd ~/larkfield-app-demo
node --input-type=module <<'JS'
import { readFileSync, writeFileSync } from 'node:fs'

const file = 'src/data/clinic.ts'
let source = readFileSync(file, 'utf8')
const edits = [
  ['export type Slot = { id: string; label: string }', 'export type Slot = { id: string; label: string; startsAt: string; full?: boolean }'],
  ["label: 'Wed 2 Dec, 09:30' }", "label: 'Wed 2 Dec, 09:30', startsAt: '2026-12-02T09:30:00+01:00' }"],
  ["label: 'Wed 2 Dec, 11:00' }", "label: 'Wed 2 Dec, 11:00', startsAt: '2026-12-02T11:00:00+01:00', full: true }"],
  ["label: 'Thu 3 Dec, 10:15' }", "label: 'Thu 3 Dec, 10:15', startsAt: '2026-12-03T10:15:00+01:00' }"],
  ["label: 'Fri 4 Dec, 14:00' }", "label: 'Fri 4 Dec, 14:00', startsAt: '2026-12-04T14:00:00+01:00' }"],
  ["label: 'Sat 5 Dec, 08:45' }", "label: 'Sat 5 Dec, 08:45', startsAt: '2026-12-05T08:45:00+01:00' }"],
]
for (const [from, to] of edits) {
  if (!source.includes(from)) throw new Error(`${file} does not match part 1: ${from}`)
  source = source.replace(from, to)
}
writeFileSync(file, source)
console.log('5 slots now have startsAt')
JS

Then add one function that turns a slot into the three strings the screen needs, at the end of the same file. Intl.DateTimeFormat writes them in the phone's language when locale is left out, so a French-speaking patient hears something like "2 décembre à 9:30" (the exact digits, such as 9:30 or 09:30, depend on the phone's Intl data). The time zone is fixed to the clinic's, because a 09:30 appointment in Lagos is still 09:30 to a patient whose phone is set to another zone:

Bash
cat >> src/data/clinic.ts <<'TS'

// The clinic's own time zone. Slot times are shown in it, whatever zone the phone is set to.
export const CLINIC_TIME_ZONE = 'Africa/Lagos'

export function slotText(slot: Slot, locale?: string) {
  const at = new Date(slot.startsAt)
  const format = (options: Intl.DateTimeFormatOptions) =>
    new Intl.DateTimeFormat(locale, { ...options, timeZone: CLINIC_TIME_ZONE }).format(at)
  return {
    time: format({ hour: '2-digit', minute: '2-digit' }),
    day: format({ day: 'numeric', month: 'short' }),
    spokenTime: format({ day: 'numeric', month: 'long', hour: 'numeric', minute: '2-digit' }),
  }
}
TS

Now the button. It takes its own small SlotOption type, the shape the screen hands it, so it does not clash with the data module's Slot. Create src/components/SlotButton.tsx:

Bash
mkdir -p src/components
cat > src/components/SlotButton.tsx <<'TSX'
import { Pressable, StyleSheet, Text } from 'react-native'

export type SlotOption = {
  id: string
  time: string
  day: string
  spokenTime: string
  practitioner: string
  available: boolean
}

type Props = {
  slot: SlotOption
  selected: boolean
  onPress: (slot: SlotOption) => void
}

export function SlotButton({ slot, selected, onPress }: Props) {
  return (
    <Pressable
      testID={`slot-${slot.id}`}
      accessibilityRole="button"
      accessibilityLabel={`${slot.spokenTime}, ${slot.practitioner}`}
      accessibilityHint={slot.available ? 'Selects this time' : 'Fully booked'}
      accessibilityState={{ selected, disabled: !slot.available }}
      disabled={!slot.available}
      hitSlop={8}
      onPress={() => onPress(slot)}
      style={({ pressed }) => [
        styles.chip,
        selected && styles.selected,
        !slot.available && styles.full,
        pressed && styles.pressed,
      ]}
    >
      {/* Capped: the time must stay on one line inside its grid column. */}
      <Text maxFontSizeMultiplier={1.6} style={[styles.time, selected && styles.onDark]}>
        {slot.time}
      </Text>
      <Text style={[styles.detail, selected && styles.onDark]}>{slot.available ? slot.day : 'Full'}</Text>
    </Pressable>
  )
}

const styles = StyleSheet.create({
  chip: {
    flexBasis: '30%',
    flexGrow: 1,
    minHeight: 48,
    paddingHorizontal: 12,
    paddingVertical: 8,
    borderRadius: 8,
    borderWidth: 1,
    borderColor: '#6a707b',
    backgroundColor: '#ffffff',
    justifyContent: 'center',
  },
  selected: { backgroundColor: '#0b0c0e', borderColor: '#0b0c0e', borderWidth: 2 },
  full: { backgroundColor: '#f1f2f4', borderStyle: 'dashed' },
  pressed: { opacity: 0.7 },
  time: { fontSize: 17, fontWeight: '600', color: '#0b0c0e' },
  detail: { fontSize: 14, color: '#2a2d33' },
  onDark: { color: '#ffffff' },
})
TSX

The testID is for the Maestro flow later; it is never read aloud. The visible text is the time and the day, not the practitioner, because the card above the buttons already shows the name; the spoken label carries it for screen reader users, who hear each button on its own.

Next, the group that holds one practitioner's slots. The name is a heading, so a screen reader user can jump from practitioner to practitioner instead of swiping through every time, and a plain sentence says how many times are free. The screen owns the chosen slot, so only one button on the whole screen is ever selected. Create src/components/SlotPicker.tsx:

Bash
cat > src/components/SlotPicker.tsx <<'TSX'
import { StyleSheet, Text, View } from 'react-native'
import { SlotButton, type SlotOption } from './SlotButton'

type Props = {
  title: string
  subtitle?: string
  slots: SlotOption[]
  selectedId: string | null
  onChange: (slot: SlotOption) => void
}

export function SlotPicker({ title, subtitle, slots, selectedId, onChange }: Props) {
  const open = slots.filter((s) => s.available).length

  return (
    <View style={styles.group}>
      <Text accessibilityRole="header" style={styles.title}>
        {title}
      </Text>
      {subtitle ? <Text style={styles.count}>{subtitle}</Text> : null}
      <Text style={styles.count}>
        {open === 0 ? 'No times left' : `${open} of ${slots.length} times free`}
      </Text>
      <View style={styles.grid}>
        {slots.map((slot) => (
          <SlotButton key={slot.id} slot={slot} selected={slot.id === selectedId} onPress={onChange} />
        ))}
      </View>
    </View>
  )
}

const styles = StyleSheet.create({
  group: { gap: 8 },
  title: { fontSize: 18, fontWeight: '600', color: '#0b0c0e' },
  count: { fontSize: 15, color: '#2a2d33' },
  grid: { flexDirection: 'row', flexWrap: 'wrap', gap: 12 },
})
TSX

Last, use them on the "Choose a time" screen. Parts 3 to 7 did not touch src/app/(tabs)/book/[serviceId].tsx, so this replaces it whole: each practitioner card becomes a SlotPicker, and the toOption function maps part 1's Slot to the button's props, with slotText for the three strings and available as the opposite of full. Tapping a free slot still pushes the details screen with the same service and time parameters part 2 set up. If you changed this screen yourself, copy your changes out first:

Bash
cat > "src/app/(tabs)/book/[serviceId].tsx" <<'TSX'
import { Stack, router, useLocalSearchParams } from 'expo-router'
import { useState } from 'react'
import { ScrollView, StyleSheet, Text, View } from 'react-native'

import type { SlotOption } from '@/components/SlotButton'
import { SlotPicker } from '@/components/SlotPicker'
import { findService, practitionersFor, slotText, type Practitioner, type Slot } from '@/data/clinic'
import { colours } from '@/theme'

function toOption(slot: Slot, practitioner: Practitioner): SlotOption {
  return { id: slot.id, ...slotText(slot), practitioner: practitioner.name, available: !slot.full }
}

export default function ChooseTimeScreen() {
  const { serviceId } = useLocalSearchParams<'/book/[serviceId]'>()
  const service = findService(serviceId)
  const [chosenId, setChosenId] = useState<string | null>(null)

  if (!service) {
    return (
      <View style={styles.screen}>
        <Stack.Screen options={{ title: 'Not found' }} />
        <Text style={styles.lead}>We do not offer that service.</Text>
      </View>
    )
  }

  return (
    <ScrollView style={styles.scroll} contentContainerStyle={styles.screen}>
      <Stack.Screen options={{ title: service.name }} />
      {practitionersFor(service.id).map((practitioner) => (
        <View key={practitioner.id} style={styles.card}>
          <SlotPicker
            title={practitioner.name}
            subtitle={practitioner.role}
            slots={practitioner.slots.map((slot) => toOption(slot, practitioner))}
            selectedId={chosenId}
            onChange={(option) => {
              const slot = practitioner.slots.find((s) => s.id === option.id)
              if (!slot) return
              setChosenId(slot.id)
              router.push({ pathname: '/book/details', params: { service: service.name, time: slot.label } })
            }}
          />
        </View>
      ))}
    </ScrollView>
  )
}

const styles = StyleSheet.create({
  scroll: { backgroundColor: colours.canvas },
  screen: { padding: 16, gap: 12 },
  lead: { fontSize: 18, fontWeight: '600', color: colours.ink },
  card: { padding: 16, borderRadius: 12, backgroundColor: colours.surface, borderWidth: 1, borderColor: colours.line },
})
TSX

Part 1's route test still passes: the practitioner's name appears once on the screen, now as the heading.

Check it worked

Bash
grep -c "startsAt: '2026-12" src/data/clinic.ts
grep -c "accessibilityState" src/components/SlotButton.tsx
grep -c "SlotPicker" "src/app/(tabs)/book/[serviceId].tsx"

It prints 5, 1 and 2. Open General check-up in the app: Dr Chidi Okafor's card says "1 of 2 times free", and the 11:00 slot has a dashed border, reads "Full" and does nothing when tapped. The next step proves every rule with a test.

Step 2 · Prove the accessibility rules with a test

Manual checks catch what tests cannot, but they are easy to skip before a release. A test that queries the picker the way a screen reader does fails the build the day someone replaces the label with the printed time or shrinks the chip. The small Picker wrapper below holds the chosen slot, as the screen does. Create src/components/SlotPicker.test.tsx:

Bash
cat > src/components/SlotPicker.test.tsx <<'TSX'
import { render, screen, userEvent } from '@testing-library/react-native'
import { useState } from 'react'
import { StyleSheet } from 'react-native'
import { slotText } from '../data/clinic'
import type { SlotOption } from './SlotButton'
import { SlotPicker } from './SlotPicker'

const slots: SlotOption[] = [
  { id: 'okafor-1', time: '09:30', day: '2 Dec', spokenTime: '2 December at 9:30', practitioner: 'Dr Chidi Okafor', available: true },
  { id: 'okafor-2', time: '11:00', day: '2 Dec', spokenTime: '2 December at 11:00', practitioner: 'Dr Chidi Okafor', available: false },
  { id: 'okafor-3', time: '14:00', day: '3 Dec', spokenTime: '3 December at 14:00', practitioner: 'Dr Chidi Okafor', available: true },
]

function Picker({ onChange }: { onChange: (slot: SlotOption) => void }) {
  const [selectedId, setSelectedId] = useState<string | null>(null)
  return (
    <SlotPicker
      title="Dr Chidi Okafor"
      subtitle="General practitioner"
      slots={slots}
      selectedId={selectedId}
      onChange={(slot) => {
        setSelectedId(slot.id)
        onChange(slot)
      }}
    />
  )
}

async function renderPicker(onChange = jest.fn()) {
  await render(<Picker onChange={onChange} />)
  return onChange
}

test('the practitioner is a heading a screen reader can jump to', async () => {
  await renderPicker()
  expect(screen.getByRole('header', { name: 'Dr Chidi Okafor' })).toBeOnTheScreen()
  expect(screen.getByText('2 of 3 times free')).toBeOnTheScreen()
})

test('every slot is a button named by its spoken time and practitioner', async () => {
  await renderPicker()
  expect(screen.getAllByRole('button')).toHaveLength(slots.length)
  for (const slot of slots) {
    expect(
      screen.getByRole('button', { name: `${slot.spokenTime}, ${slot.practitioner}` }),
    ).toBeOnTheScreen()
  }
})

test('every slot is at least 44 points tall', async () => {
  await renderPicker()
  for (const button of screen.getAllByRole('button')) {
    const style = StyleSheet.flatten(button.props.style)
    expect(style.minHeight).toBeGreaterThanOrEqual(44)
  }
})

test('a full slot is disabled, says Full and cannot be chosen', async () => {
  const onChange = await renderPicker()
  const full = screen.getByRole('button', { name: '2 December at 11:00, Dr Chidi Okafor' })
  expect(full).toBeDisabled()
  expect(screen.getByText('Full')).toBeOnTheScreen()
  await userEvent.setup().press(full)
  expect(onChange).not.toHaveBeenCalled()
})

test('choosing a slot marks it selected for assistive technology', async () => {
  const onChange = await renderPicker()
  const user = userEvent.setup()
  await user.press(screen.getByRole('button', { name: '3 December at 14:00, Dr Chidi Okafor' }))
  expect(onChange).toHaveBeenCalledWith(slots[2])
  expect(screen.getByRole('button', { name: '3 December at 14:00, Dr Chidi Okafor' })).toBeSelected()
  expect(screen.getByRole('button', { name: '2 December at 9:30, Dr Chidi Okafor' })).not.toBeSelected()
})

test('slot text comes from startsAt, in the clinic time zone', () => {
  const text = slotText({ id: 'okafor-1', label: 'Wed 2 Dec, 09:30', startsAt: '2026-12-02T09:30:00+01:00' }, 'en-GB')
  expect(text.time).toBe('09:30')
  expect(text.day).toBe('2 Dec')
  expect(text.spokenTime).toMatch(/^2 December.*9:30$/)
})
TSX
npx jest src/components/SlotPicker.test.tsx

getByRole('button', { name }) only finds an element whose role and accessible name match, which is exactly what TalkBack and VoiceOver announce. toBeSelected and toBeDisabled read accessibilityState and disabled, the same values the phone passes to the screen reader. The last test pins en-GB so it gives the same answer on any computer.

The test cannot hear a phone or see text at 200 percent, so do a short manual pass on a real device before each release. Make a React Native app work with screen readers covers the gestures and what to listen for in more depth.

  1. Turn on TalkBack (Android) or VoiceOver (iOS) and book an appointment without looking at the screen. Every control should say what it is and what it does.
  2. Set the largest font size (Android: Settings, Display, Font size; iOS: Settings, Accessibility, Display and Text Size, Larger Text) and walk through each screen. Nothing should be cut off, and buttons should stay inside the screen.
  3. Repeat on the smallest, cheapest Android phone you can borrow. Many Larkfield patients in Lagos and Nairobi use budget phones about 360 dp wide, often with a large font size already set.

Check it worked

Jest reports Tests: 6 passed, 6 total. To see the test guard the target size, change minHeight: 48 to minHeight: 32 in SlotButton.tsx and run the same command: the "at least 44 points tall" test fails. Put the value back.

Step 3 · Decide who owns each version number

Every build carries two numbers, and mixing them up is the most common reason a store upload is refused:

  • version (for example 1.2.0) is what patients see in the store. You choose it. Raise the minor number for new features and the patch number for fixes. Apple and Google both expect each store release to be higher than the last.
  • The build number (ios.buildNumber, android.versionCode) is for the stores only. It must be new on every upload, including test builds nobody outside the team sees.

The policy for Larkfield: people own version, EAS owns build numbers. With appVersionSource set to "remote", Expo's servers store the build numbers and autoIncrement raises them on every production build, so two people building on the same day cannot collide. The values in your app config are ignored, so delete them to avoid confusion. Build and submit an app with EAS explains the profiles. The release check reads eas.json, so make sure it holds this policy now. If eas build:configure already wrote the file, the script below keeps its profiles and settings and only adds what is missing; if there is no file yet, it writes one with the usual three profiles:

Bash
node --input-type=module <<'JS'
import { existsSync, readFileSync, writeFileSync } from 'node:fs'

const eas = existsSync('eas.json') ? JSON.parse(readFileSync('eas.json', 'utf8')) : {}
eas.cli = { version: '>= 27.11.0', ...eas.cli, appVersionSource: 'remote' }
eas.build = {
  development: { developmentClient: true, distribution: 'internal' },
  preview: { distribution: 'internal' },
  ...eas.build,
}
eas.build.production = { ...eas.build.production, autoIncrement: true }
eas.submit = { production: {}, ...eas.submit }
writeFileSync('eas.json', JSON.stringify(eas, null, 2) + '\n')
console.log('eas.json profiles:', Object.keys(eas.build).join(', '))
JS

It prints the profile names, for example eas.json profiles: development, preview, production. Then set the first release version and remove any hand-written build numbers. The script below edits app.json in place and leaves every other setting from earlier parts alone:

Bash
node --input-type=module <<'JS'
import { readFileSync, writeFileSync } from 'node:fs'

const app = JSON.parse(readFileSync('app.json', 'utf8'))
app.expo.version = '1.0.0'
delete app.expo.ios?.buildNumber
delete app.expo.android?.versionCode
writeFileSync('app.json', JSON.stringify(app, null, 2) + '\n')
console.log(`version ${app.expo.version}, build numbers left to EAS`)
JS

If the app is already in a store, tell EAS the last build number you uploaded with eas build:version:set before the first remote build, so it continues from there.

Check it worked

The script prints version 1.0.0, build numbers left to EAS. Confirm what Expo will build with:

Bash
npx expo config --json --type public | node -e "
const c = JSON.parse(require('fs').readFileSync(0, 'utf8'))
console.log(c.version, c.ios?.buildNumber ?? 'no ios.buildNumber', c.android?.versionCode ?? 'no android.versionCode')
"

It prints 1.0.0 no ios.buildNumber no android.versionCode.

Step 4 · Give the app its own name, icon and splash screen

The template's icon and splash are still in place. Replace the image files with the clinic's artwork, keeping the names and sizes, so the configuration does not change:

  • assets/images/icon.png: 1024 by 1024 pixels, no transparency, no rounded corners (each platform applies its own mask).
  • assets/images/android-icon-foreground.png, android-icon-background.png and android-icon-monochrome.png: the layers of Android's adaptive icon. Keep the clinic's mark inside the middle two thirds, because launchers crop the edges into circles, squircles or teardrops. The monochrome layer is used for themed icons on Android 13 and later.
  • assets/expo.icon: the iOS icon, made in Apple's Icon Composer, which ios.icon points to.
  • assets/images/splash-icon.png: the mark shown while the app starts. Keep it simple and small; a splash screen that shows a whole poster takes longer to read than to load.

Now set the name under the icon and the splash colours, with a dark variant so a phone in dark mode does not flash white at the patient:

Bash
node --input-type=module <<'JS'
import { readFileSync, writeFileSync } from 'node:fs'

const app = JSON.parse(readFileSync('app.json', 'utf8'))
const expo = app.expo
expo.name = 'Larkfield'
expo.android = {
  ...expo.android,
  adaptiveIcon: { ...expo.android?.adaptiveIcon, backgroundColor: '#f1f2f4' },
}
const splash = [
  'expo-splash-screen',
  {
    image: './assets/images/splash-icon.png',
    imageWidth: 160,
    backgroundColor: '#f1f2f4',
    dark: { image: './assets/images/splash-icon.png', backgroundColor: '#0b0c0e' },
  },
]
const at = expo.plugins.findIndex((p) => (Array.isArray(p) ? p[0] : p) === 'expo-splash-screen')
if (at === -1) expo.plugins.push(splash)
else expo.plugins[at] = splash
writeFileSync('app.json', JSON.stringify(app, null, 2) + '\n')
console.log('name, adaptive icon background and splash set')
JS

If the clinic's mark is dark, give the dark entry a light version of the image. The splash only shows in a new native build: Expo Go shows the app icon instead, and a development build does not reflect every option, so check it on a preview or release build.

Check it worked

Bash
npx expo config --json --type public | node -e "
const c = JSON.parse(require('fs').readFileSync(0, 'utf8'))
const splash = c.plugins.find((p) => Array.isArray(p) && p[0] === 'expo-splash-screen')[1]
console.log(c.name, c.android.adaptiveIcon.backgroundColor, splash.backgroundColor, splash.dark.backgroundColor)
"

It prints Larkfield #f1f2f4 #f1f2f4 #0b0c0e: the name, the adaptive icon background, the splash background and the dark splash background.

Step 5 · Explain every permission and remove the ones you do not use

Both stores review permissions. On iOS, each permission prompt shows a purpose string from Info.plist, written by you, saying why this app needs it. Apple rejects apps whose strings are missing or vague. On Android, every permission in the final manifest is listed on the store page, and patients notice a clinic app that asks for storage or contacts.

Start from what Larkfield actually uses:

  • Notifications, from part 5. iOS needs no purpose string for them. The system prompt cannot be customised on either platform, so the card part 5 shows before asking ("We can remind you the day before and 2 hours before your appointment") does that job.
  • Nothing else today. When the clinic adds a feature that needs a permission, such as scanning an insurance or NHIS card with the camera, set its string in the same change. Expo's plugins insert a default such as Allow $(PRODUCT_NAME) to access your camera, which says nothing about why. Write your own in the plugin's options or under ios.infoPlist, for example "NSCameraUsageDescription": "Larkfield uses the camera to scan your insurance card so you do not have to type the number.", and translate it in each locale file if the app is translated.

The Android template adds storage permissions that the clinic app never needs. android.blockedPermissions removes them from the final manifest, even when a library asks for them. Use the full names:

Bash
node --input-type=module <<'JS'
import { readFileSync, writeFileSync } from 'node:fs'

const app = JSON.parse(readFileSync('app.json', 'utf8'))
const blocked = new Set(app.expo.android?.blockedPermissions ?? [])
blocked.add('android.permission.READ_EXTERNAL_STORAGE')
blocked.add('android.permission.WRITE_EXTERNAL_STORAGE')
app.expo.android = { ...app.expo.android, blockedPermissions: [...blocked] }
writeFileSync('app.json', JSON.stringify(app, null, 2) + '\n')
console.log('blocked:', [...blocked].join(', '))
JS

Info.plist and manifest changes only reach phones in a new native build; an over-the-air update cannot change them. Two related forms live in the stores rather than the app: App Store Connect's privacy details and Google Play's Data safety section. Fill them in from the same list: Larkfield stores the patient's name, phone number, date of birth and appointment reason, and sends them to the clinic. Prepare App Store and Google Play listings and privacy forms walks through both forms answer by answer. If a library you add uses an API Apple lists as needing a reason, add it under ios.privacyManifests as Expo's Apple privacy guide describes.

Check it worked

Introspection runs the config plugins in memory and shows what the native projects will receive, without writing ios or android folders:

Bash
npx expo config --type introspect | grep -B1 -A1 "EXTERNAL_STORAGE"

Both storage permissions appear with 'tools:node': 'remove', which tells Android's manifest merger to drop them. Libraries add a few more of their own when the app is built, such as RECEIVE_BOOT_COMPLETED from expo-notifications, which lets reminders survive a restart. Read the full list of a built app on its Play Console page or with aapt dump permissions before the first release.

Step 6 · Put the whole checklist in one script

The checks so far live in your head and in grep commands. Put them in a script that reads the final configuration, the same one a build uses, and reports each item. WARN lines are things to decide before the first store build; FAIL lines stop the release. Create scripts/release-check.mjs:

Bash
mkdir -p scripts
cat > scripts/release-check.mjs <<'JS'
import { execFileSync } from 'node:child_process'
import { existsSync, readFileSync } from 'node:fs'

const config = JSON.parse(
  execFileSync('npx', ['expo', 'config', '--json', '--type', 'introspect'], { encoding: 'utf8' }),
)
const eas = JSON.parse(readFileSync('eas.json', 'utf8'))
const infoPlist = config._internal.modResults.ios.infoPlist
const manifest = config._internal.modResults.android.manifest.manifest

let failures = 0
const pass = (msg) => console.log(`OK    ${msg}`)
const warn = (msg) => console.log(`WARN  ${msg}`)
const fail = (msg) => {
  failures += 1
  console.log(`FAIL  ${msg}`)
}

// Versions: people own `version`, EAS owns the build numbers.
if (/^\d+\.\d+\.\d+$/.test(config.version ?? '')) pass(`version ${config.version}`)
else fail(`version "${config.version}" is not MAJOR.MINOR.PATCH`)

if (eas.cli?.appVersionSource !== 'remote') fail('eas.json cli.appVersionSource is not "remote"')
else if (config.ios?.buildNumber || config.android?.versionCode)
  fail('remove ios.buildNumber and android.versionCode: EAS ignores them with a remote version source')
else pass('build numbers come from EAS')

if (eas.build?.production?.autoIncrement !== true) fail('production profile has no autoIncrement')
else pass('production builds raise the build number')

// Identity: the IDs you ship under cannot change after the first upload.
for (const [name, id] of [
  ['ios.bundleIdentifier', config.ios?.bundleIdentifier],
  ['android.package', config.android?.package],
]) {
  if (!id) fail(`${name} is missing`)
  else if (id.startsWith('com.example.')) warn(`${name} is ${id}: replace it with your own before the first store build`)
  else pass(`${name} ${id}`)
}

// Icon: one square PNG of at least 1024 x 1024 pixels.
function pngSize(path) {
  const bytes = readFileSync(path)
  if (bytes.toString('ascii', 1, 4) !== 'PNG') return null
  return [bytes.readUInt32BE(16), bytes.readUInt32BE(20)]
}
const icon = config.icon && existsSync(config.icon) ? pngSize(config.icon) : null
if (!icon) fail(`icon ${config.icon} is missing or not a PNG`)
else if (icon[0] !== icon[1] || icon[0] < 1024) fail(`icon is ${icon.join(' x ')}, needs a square 1024 x 1024`)
else pass(`icon ${icon.join(' x ')}`)

const splash = (config.plugins ?? []).find((p) => Array.isArray(p) && p[0] === 'expo-splash-screen')?.[1]
if (!splash?.image || !existsSync(splash.image)) fail('expo-splash-screen plugin has no image file')
else if (!splash.dark) warn('splash has no dark mode colours')
else pass(`splash ${splash.image} on ${splash.backgroundColor}, dark ${splash.dark.backgroundColor}`)

// Purpose strings: every iOS permission prompt needs a sentence written for this app.
const usage = Object.entries(infoPlist).filter(([key]) => /^NS.*UsageDescription$/.test(key))
for (const [key, text] of usage) {
  if (String(text).includes('$(PRODUCT_NAME)')) fail(`${key} is a library default: "${text}"`)
  else pass(`${key}: "${text}"`)
}
if (usage.length === 0) pass('no iOS permission prompts need a purpose string')

// Android permissions: list what the app asks for, and confirm the blocked ones are removed.
for (const p of (manifest['uses-permission'] ?? []).map((entry) => entry.$)) {
  const name = p['android:name'].replace('android.permission.', '')
  if (p['tools:node'] === 'remove') pass(`Android ${name} removed`)
  else console.log(`INFO  Android ${name}`)
}

console.log(failures ? `\n${failures} problem(s) to fix before a store build.` : '\nReady for a store build.')
process.exitCode = failures ? 1 : 0
JS
node scripts/release-check.mjs

The INFO lines are the permissions left in the manifest. Read them every release: a new one means a library added it, and you either explain it on the store page or block it.

Then run the checks Expo and your tests already provide. expo-doctor compares your dependencies with the ones SDK 58 expects, the export proves every route bundles, and Jest runs the whole suite from parts 1 to 7. Part 4's sync tests talk to the mock clinic API, so start it in a second terminal first and leave it running, as in part 7:

Bash
cd ~/larkfield-app-demo
node mock-api/server.mjs
Bash
npx expo-doctor@1.21.9
npx expo export --platform web --platform android
npx jest

Check it worked

The release check ends with Ready for a store build., with OK lines for the version, build numbers, icon (1024 x 1024) and splash, OK for the two removed storage permissions, and two WARN lines for the com.example.larkfield IDs until you replace them in app-links.json. expo-doctor ends with something like 20/20 checks passed, the export ends with Exported: dist, and Jest reports every suite passing. Add "ios": { "buildNumber": "3" } to app.json and run the check again: it prints a FAIL line and exits with status 1. Remove it again.

Step 7 · Book an appointment end to end with Maestro

Jest proves components and modules; it does not prove that the built app launches, that the Book tab leads to the details screen, or that the keyboard does not cover the button. A Maestro flow drives the real app on an emulator, tapping and typing like a patient, and waits for each screen by itself.

Maestro finds elements by visible text or by id, which it reads from React Native's testID. Text changes with translations, so give the four booking fields from part 2 an ID each. FormField passes extra props to its TextInput, so add one prop to each field in src/components/BookingForm.tsx:

TSX
<FormField testID="booking-full-name" label="Full name" /* existing props */ />
<FormField testID="booking-phone" label="Mobile number" /* existing props */ />
<FormField testID="booking-date-of-birth" label="Date of birth" /* existing props */ />
<FormField testID="booking-reason" label="Reason for the visit" /* existing props */ />

The slot buttons already have IDs made from the slot IDs in src/data/clinic.ts, such as slot-okafor-1 for Dr Okafor's 09:30. Now the flow, in five parts, following the path a patient takes: the Book tab lists the services, tapping General check-up (matched as General check-up.*, because the card's text includes its length and summary) opens "Choose a time", and tapping a free slot opens the details screen straight away, as part 2 set up. appId is your package name; replace it if yours differs:

Bash
mkdir -p .maestro
cat > .maestro/book-appointment.yaml <<'YAML'
appId: com.example.larkfield
---
# 1. Start as a new patient, with reminders allowed
- launchApp:
    clearState: true
    permissions:
      notifications: allow
# 2. Choose a service on the Book tab, then a time
- tapOn: "General check-up.*"
- tapOn:
    id: "slot-okafor-1"
# 3. Fill in the patient's details
- tapOn:
    id: "booking-full-name"
- inputText: "Amina Yusuf"
- tapOn:
    id: "booking-phone"
- inputText: "08031234567"
- tapOn:
    id: "booking-date-of-birth"
- inputText: "1990-04-23"
- tapOn:
    id: "booking-reason"
- inputText: "Blood pressure check"
- hideKeyboard
# 4. Send the request
- tapOn: "Request appointment"
# 5. See the booking on the Appointments tab
- assertVisible: "General check-up with .*"
YAML

Since part 3, the submit handler saves the booking on the phone and replaces the details screen with the Appointments tab, so the last check looks for the new row there rather than for part 2's "Request saved" message. Text selectors are regular expressions that must match the whole text, so General check-up with .* matches the row whatever practitioner name follows, but not the "General check-up · Wed 2 Dec, 09:30" summary at the top of the details screen. If the submit fails and the details screen stays, the flow fails.

Install Maestro, pinned to the version this flow was written for. It needs Java 17 or later:

Bash
export MAESTRO_VERSION=2.12.1; curl -fsSL "https://get.maestro.mobile.dev" | bash

Start an Android emulator from Android Studio and install a release build of the app. Maestro cannot launch your own appId inside Expo Go, so it needs a real build. The flow does not need the mock clinic API from part 4: the booking reaches the Appointments tab from the phone's own database, and the outbox sends it later. A release build could not reach the mock API anyway. It is built with part 4's default address, http://127.0.0.1:4010, which on the emulator means the emulator itself (your computer is 10.0.2.2 there), and Android blocks plain http traffic in release builds by default. So the booking stays in the outbox as "Saved on your phone, waiting to send", which is the right behaviour with no server. Part 4 shows the sync itself with a development build:

Bash
cd ~/larkfield-app-demo
npx expo run:android --variant release
maestro test .maestro/book-appointment.yaml

On a Mac, npx expo run:ios --configuration Release with a simulator open works the same way. For a closer match to what patients run, install an EAS preview build instead. Write end-to-end mobile tests with Maestro covers shared sign-in flows, tags and running flows in CI.

Check it worked

Maestro lists each command with a tick as it runs and ends with the flow passing. When a step fails, it stops at that command and names the element it could not find, such as id: booking-phone; that usually means the testID is missing or the screen changed. Run the flow once with the emulator's font size set to the largest: if hideKeyboard or a tap fails there, the layout needs work before release.

Step 8 · Hand over to EAS, then clean up the series

Before the first store build, replace com.example.larkfield in app-links.json with the bundle identifier and package name you will ship under, and run the release check until it has no WARN or FAIL lines. Then follow build and submit an app with EAS from its build step:

Bash
eas build --platform all --profile production

EAS takes the next build numbers itself. Keep scripts/release-check.mjs, the accessibility test and the Maestro flow in your real app's repository, and run all three before every release.

That ends the series. If you made ~/larkfield-app-demo only to follow along, remove what it created. If the mock clinic API from part 4 is still running, stop it with Ctrl+C in its terminal. Then remove the app from the emulator:

Bash
adb uninstall com.example.larkfield

The next command deletes the whole project folder and cannot be undone. That includes the mock clinic API, because part 4 created it inside the project at ~/larkfield-app-demo/mock-api/server.mjs, so nothing else from the series is left on your computer. Copy out anything you want to keep, such as the release check script, first:

Bash
cd ~
rm -rf ~/larkfield-app-demo

If you ran eas init or eas build for the demo, delete the project from its settings page on expo.dev, which also removes its stored builds and credentials. Maestro lives in ~/.maestro; delete that folder if you no longer need it.

Check it worked

Bash
if [ -e ~/larkfield-app-demo ]; then echo "still there"; false; else echo "demo project removed"; fi

It prints demo project removed. On the emulator, the Larkfield icon is gone from the app drawer.

Next steps

Need this done for you?

Padding does this work for growing companies, from the first diagnosis to a system that keeps working.

Platform Engineering

Get new tutorials

New tutorials, about twice a month.