All jobs / Mobile developer / Cross-Platform
Mobile developer interview question · 3–5 years
A cross-platform codebase has is-iOS / is-Android checks scattered through the screens, and a fix for one platform keeps breaking the other. How do you organise it?
The strongest answer
Put the difference behind one interface the shared code calls, with the platform implementations at the edge, so a screen reads the same on both and each platform has exactly one place to change
Why it works
Exactly — shared code stays platform-blind, and the platform detail lives where the platform team can own it.
What a good answer covers
- Hide platform detail behind an interface.
- Shared code stays platform-blind.
- Implementations live at the edge.
- Never fork the screen.
Answers that fall short
- Close, but not the strongest: Extract the checks into a helper module so at least the conditionals live in one file
That is the first step. The interface matters more than the file: shared code should not ask which platform it is on. - Weak: Leave them inline — they are only a couple of lines each and it is obvious what they do
Scattered checks are how the two platforms drift; every new branch is a place one side is forgotten. - Red flag: Fork the screen into an iOS version and an Android version and keep the two in sync by hand
Two hand-synced copies diverge within a release, and the bug is always in the copy you did not open.
Who gets asked this
More Cross-Platform questions
- A Flutter upgrade enables Impeller everywhere. What do you do before the store push?
- A native app will host one React Native flow. What do you insist on?
- An RN screen is slow and the team wants to “rewrite in native.” What do you do first?
- You will migrate a native app toward RN (or the other way) over a year. What does the programme look like?
- Frontend web engineers will contribute to RN. What ownership model actually works?
- A Flutter screen rebuilds the whole tree on every keystroke. What is the first fix?
- A React Native list reshuffles items and several rows show the wrong image. What do you look at first?
- How do you treat the Android system Back button versus iOS’s interactive pop?