· 6 min read
iOS and Android in Parallel with Claude: One Spec, Two Apps
How I build one feature for the iOS and Android apps at the same time with two Claude agents: a shared spec, a shared Maestro flow and a parity review.
Building a feature for iOS and Android in parallel used to mean doing it twice, one after the other. Now I hand the same feature to two Claude Code agents, one per app, and they work at the same time. The speed is real. The new problem is drift: two agents read the same request and ship two slightly different features. A label differs, an error state is missing on one side, a toggle saves at a different moment. This post shows the three things that keep the two apps in step: one platform-neutral spec, one Maestro flow that runs on both apps, and a parity review where each agent checks the other one's work.
The example below is made up: a notifications toggle on a settings screen. The method is what I actually use.
Why two agents drift apart
Each agent only sees its own repo. The iOS agent reads Swift and the iOS project's habits. The Android agent reads Kotlin and the Android project's habits. Give both a one-line request like "add a notifications toggle to settings" and each fills the gaps with whatever its codebase suggests.
That is fine for code. I do not want identical code. SwiftUI and Jetpack Compose have different idioms, and forcing one shape on both makes both worse. What must match is behavior: what the user sees, what happens on each tap, and what happens when something fails.
So I split the work in two layers:
- Behavior is shared. One document, one test, one definition of done.
- Implementation is native. Each agent follows its own platform and its own repo rules.
One platform-neutral spec
The spec lives in a place both agents can read. It describes the feature without a single line of Swift or Kotlin. It has four parts: the goal, the user-visible behavior as numbered scenarios, the non-goals, and the shared identifiers.
Feature: notifications toggle
## Goal
Users can turn push notifications on or off from Settings.
## Scenarios
S1. Settings shows a "Notifications" row with a switch.
The switch reflects the saved value.
S2. Tapping the switch saves the new value at once.
No "Save" button.
S3. If saving fails, the switch returns to the old value
and a short error message appears.
S4. If the OS permission is denied, the switch is off and
disabled, with a "Turn on in system settings" hint.
## Non-goals
- No redesign of the Settings screen.
- No new analytics events.
## Shared identifiers
- settings_notifications_row
- settings_notifications_switch
- settings_notifications_error
The numbered scenarios matter most. Each agent must reply with the scenario IDs it implemented and where. "Done" means S1 to S4, not "I added a toggle". I wrote more about this kind of spec in Spec-Driven AI Coding: Make the Agent Prove It Is Done, and about non-goals in AI Coding Agent Scope Creep.
The shared identifiers are the bridge to testing. They are boring strings, and that is the point: both apps use the exact same names.
One Maestro flow for both apps
Maestro runs the same YAML flow on iOS and Android. Its id selector matches the accessibility identifier on iOS and the resource ID on Android. So if both agents use the shared identifiers from the spec, one flow can test both apps.
On iOS, in SwiftUI:
Toggle("Notifications", isOn: $viewModel.notificationsOn)
.accessibilityIdentifier("settings_notifications_switch")
On Android, in Compose, a test tag only becomes a resource ID when you opt in once near the root of the screen:
Scaffold(
modifier = Modifier.semantics { testTagsAsResourceId = true }
) {
Switch(
checked = state.notificationsOn,
onCheckedChange = onToggle,
modifier = Modifier.testTag("settings_notifications_switch")
)
}
Then one flow covers scenarios S1 and S2 on both platforms:
appId: ${APP_ID}
---
- launchApp
- tapOn:
id: "settings_tab"
- assertVisible:
id: "settings_notifications_row"
- tapOn:
id: "settings_notifications_switch"
- stopApp
- launchApp
- tapOn:
id: "settings_tab"
- assertVisible:
id: "settings_notifications_switch"
The real assertion on the saved value depends on how your switch exposes its state, so check the Maestro selectors docs for the options. Pass the app ID per platform with maestro test -e APP_ID=....
I write this flow before either agent starts. It goes into the task for both agents as the acceptance test. When the flow fails on one platform, that agent has a clear, shared target, not my opinion of what "matches" means. The error and permission scenarios, S3 and S4, need a fake or a test build that can force a failure. I keep those in unit tests on each side and list them in the spec too.
Run the agents, then swap the reviews
The run itself is simple. Each app gets its own git worktree and its own feature branch, and each agent works in its own worktree. They do not share files, so they cannot step on each other. Claude Code has a guide to running parallel sessions with worktrees if you have not set this up yet.
When both agents report done, I do one extra step before my own review. I give each agent the other one's diff and the spec, with one question: "Which scenarios does this implementation handle differently from yours?"
This is the step I like most. Two implementations of the same spec work like a cross-check. Where they disagree, one of three things is true:
- One agent made a mistake. Fix it on that side.
- The spec was vague. Fix the spec first, then both sides.
- The platforms really differ. For example, how the OS shows permission prompts. Write that difference into the spec, so it is a decision and not an accident.
The second case is the most useful. A gap that one developer would quietly fill with a guess shows up as a visible disagreement between two agents.
After that I review each branch myself, run the shared Maestro flow and the unit tests on both, and merge one branch at a time.
The honest trade-offs
The pros outweigh the cons for me, but there are cons.
What works well:
- Both apps move at the same pace. Neither platform waits a sprint for the other.
- Spec gaps surface early. Two readers of one spec find its holes faster than one.
- The Maestro flow lives on. It becomes a regression test for both apps, not a one-off check.
What costs me:
- Review is still mine, twice. Two diffs in two languages. The parity review helps, but it does not replace reading the code.
- The spec takes time up front. For a small change, writing scenarios and identifiers can feel slower than just doing it. I skip the shared flow for tiny fixes.
- Shared identifiers need discipline. One renamed ID breaks the flow on one side. I treat the identifier list as part of the spec, and changes to it go through the spec too.
- Agents copy each other if you let them. If I show one agent the other's code too early, it ports Kotlin habits into Swift. Swap diffs only after both are done.
Takeaways
- Share behavior, not code. One platform-neutral spec with numbered scenarios is the contract for both apps.
- Put shared identifiers in the spec, so one Maestro flow can test iOS and Android.
- Write the acceptance flow before the agents start, and give it to both.
- After both agents finish, swap the diffs and ask each one where the other differs from the spec.
- Every disagreement is a bug, a vague spec, or a real platform difference. Write down which one it was.