Skip to content

feat(onboarding): resume onboarding after a kill and on re-login - #1151

Merged
bmc08gt merged 6 commits into
mainfrom
feat/onboarding-resume
Oct 28, 2026
Merged

bmc08gt merged 6 commits into
mainfrom
feat/onboarding-resume

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Oct 28, 2026

Copy link
Copy Markdown
Collaborator

Killing the app on the display-name or push screen relaunched straight to home, because registration makes the account current before onboarding finishes. The same hole meant a reinstall or a re-login never offered the push prompt. Android already handles both; this matches its behavior.

  • Marker. A per-owner onboardingCompleted map in UserDefaults (OnboardingProgress). An absent entry counts as completed, so users upgrading from a build without it stay on home.
  • Writes. false is written in authenticate before accountManager.set for registrations and interactive logins; true is written right before completeLogin at the end of onboarding.
  • Launch. A current account with a false marker is held in SessionAuthenticator.pendingOnboarding instead of calling completeLogin. IntroScreen hands it to OnboardingViewModel.resumeOnboarding, which shows the display-name step if the profile has no name (fetched with the account's own key; falls back to the cached name, and skips the step if neither is known) and then applies the existing advanceFromNameStep push rule.
  • Interactive logins. Seed entry, the account picker and switchAccount (including the flipcash://login deep link) call beginOnboarding instead of completeLogin, so they run the same name/push gate.
  • Reinstall. The keychain keeps the current account across an uninstall but UserDefaults does not, so a first launch (launchCount == nil) that already has a current account reopens the marker and offers push again.

No new UI; the existing name and push screens are reused. Unlike Android there is no resume-at-access-key point, since iOS registers after the key is confirmed.

A kill on the name or push screen relaunched straight to home, because
registration sets the current account before onboarding finishes. A
reinstall and re-login skipped the push prompt for the same reason.

Track a per-owner onboarding-completed marker in UserDefaults (absent
means completed, so upgraded users stay on home). Registration and
interactive logins write false before the account becomes current; the
end of onboarding writes true. A launch with a false marker holds the
account and resumes at the display-name step when the profile has no
name, otherwise at the push step. Seed entry, the account picker and
switchAccount go through the same gate.
The keychain keeps the signed-in account across an uninstall but
UserDefaults does not, so a reinstall found no onboarding marker and
went straight home with notification permission reset. A first launch
that already has a current account now reopens the marker.
@bmc08gt bmc08gt self-assigned this Oct 28, 2026
While an account waits on its resumed step the intro is replaced by the
launch background, and the stack is created with the path already seeded
so the first screen has no push animation. The resumed first screen hides
its back button, and the push step can return to the name step only when
the name step is in the flow. The profile lookup gives up after 5 seconds.
@bmc08gt
bmc08gt merged commit d9a0fe3 into main Oct 28, 2026
5 checks passed
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.

1 participant