In a smart-home security app installed on phones for years, when should a minimum-version gate hard-block old builds rather than show a soft update prompt?
answer
- harm, not novelty, justifies a block
- two thresholds, soft and hard
- the check must already be in the binary
- cached values, never block on a failed fetch
- the prompt only leads to the store
basics
~20 sHard-block only when running the old build causes harm, such as a flawed pairing protocol; use a dismissible soft prompt for everything else. Both checks must already be in the binary, using cached thresholds and never blocking on a failed fetch.
solid answer
~50 sA **soft prompt** is dismissible and fits new features, deprecations and performance fixes: the user can ignore it, and it returns after a back-off. A **hard block** is a non-dismissible screen, justified only when continuing to run the old build causes harm, such as a lock-pairing protocol with a security flaw, or when the server can no longer serve that build safely. The client compares its own build number with two remotely delivered thresholds, `min_soft` and `min_hard`, caches the last values it received, and never blocks because a fetch failed. The gate logic must exist in the binary from early on, because an installed build obeys only the checks it shipped with. The prompt itself just leads to the store: a link to the store page, or, on one store, a built-in in-app update flow.
code
pseudocode · 12 lineson launch, on return to foreground, on an 'upgrade required' response:
gate = fetched_gate if fetch succeeded else cached_gate
if gate is missing:
allow # no thresholds yet: never block
elif own_build < gate.min_hard:
show hard block # emergency paths stay reachable
elif own_build < gate.min_soft and not dismissed_since(gate.prompt_backoff):
show soft prompt # remember the dismissal
else:
allow
if fetch succeeded:
cached_gate = fetched_gatego deeper
Know the difference between a dismissible update prompt and a screen that blocks the app, and that the app can only send the user to the store.
Explain the two thresholds, the check at launch and foreground, caching, and why the gate must already be in the binary before any threshold is set.
Argue when harm justifies a block, prefer blocking one capability over the whole app, and refuse to block on a failed fetch or during an emergency.
Set the shared rule for many teams: who may raise a hard threshold, what evidence it needs, and the announced escalation from soft prompt to block.
## The decision the interviewer wants A smart-home security app has households on builds up to several years old. Many of them open the app only when the alarm sounds. The team wants old builds to update, and the interviewer asks when a **minimum-version gate** may stop the app working (a **hard block**) and when it should only ask (a **soft prompt**). How the server tells the client the thresholds is a separate question; this one is the client's half: the decision, the check and the prompt. ## Soft prompt versus hard block | | Soft prompt | Hard block | |---|---|---| | User can dismiss it | Yes, it returns after a back-off | No, the app's normal use stops | | Justified by | New features, deprecations, performance, an API the team wants to retire later | Harm: a security flaw, a protocol the server can no longer accept safely, a legal requirement | | Cost when wrong | Mild annoyance, slower adoption | Households locked out of their locks and alarm, support load, bad reviews | | Who it cannot reach | Users who never open the app | The same users, at the worst moment, when the alarm sounds | The rule of thumb: **harm, not novelty, justifies a block.** "We want everyone on the redesign" is a soft-prompt reason. "Version 5.x pairs locks with an exchange an attacker nearby can abuse" is a hard-block reason. Even then, if the harm is confined to one capability, block that capability (pairing) rather than the whole app. ## The client's check The gate is a small piece of logic that runs: - at launch and when the app returns to the foreground; - whenever a server response says the build is no longer supported, such as an HTTP `426 Upgrade Required`. It compares the app's own build number with two thresholds, `min_soft` and `min_hard`. Several properties matter: - **The logic must already be in the binary.** An installed build obeys only the checks it shipped with, so a gate added in version 7 does nothing for version 5. Teams ship the gate in their first release, with no thresholds set. - **Thresholds are remote, not compiled in.** The binary holds the comparison; the numbers arrive with the launch configuration or a version-check response and can change without a release. - **Cache the last values.** The app stores the most recent thresholds with when it received them, and applies them on the next launch even offline. - **Never block on a failed fetch.** If no thresholds have ever arrived, or the network is down, the app runs. A security app that refuses to open on a dead connection fails exactly when the household needs it. - **Remember dismissals.** A soft prompt that reappears on every screen trains users to tap through it; show it again after a back-off (a day, then a week, as an assumption). ## The prompt is only a path to the store The app cannot install a new version of itself. The prompt's job is to get the user to the store's update: 1. On either platform, a button that opens the app's **store page**. 2. On one store, a built-in **in-app update flow**: a flexible mode that downloads in the background while the app stays usable, and an immediate mode, a full-screen flow the user must accept, after which the app restarts. A design should not rely on the other platform offering the same flow. A soft prompt pairs naturally with a background download; a hard block with the full-screen flow or the store link. ## Timing and wording - Do not show either kind while an alarm is sounding; show the alarm first. - Say what the update changes for the household ("pairing new locks needs version 6.3"), not "a new version is available". - Escalate in steps: soft prompt for a while, then hard block for a harm that the team has already announced, so the block is not the first notice. ## What a strong answer adds A middle-level candidate states the two kinds, when each is justified, and that the check must exist before it is needed. A stronger one adds the failure modes: blocking on a failed fetch, a block shown during an emergency, a whole-app block where blocking one capability would do, and a block for phones that cannot install the new version at all.
- Why ship the gate logic in the first release, before any threshold exists?Because an installed build obeys only the code it shipped with. If the gate first appears in version 7, every household on version 5 or 6 can never be blocked or even prompted by it. Shipping the comparison early, with no thresholds set, means any future harm can be gated on every build released since.
- What should the gate do when the app has a cached hard threshold but no network?Apply the cached value: the block was already decided and the build is still below it. What it must not do is invent a block because the fetch failed, or block when no threshold was ever received. Even when blocking, the emergency paths stay reachable.
- Every new feature release should raise the hard minimum version.
- If the version check cannot reach the server, block the app to be safe.
- We will add the version gate when we first need to force an update.
- The app can download and install its own new version, bypassing the store.
- Show the update prompt on every screen until the user updates.