Skip to content

Conversation

@ahmed-tarek-salem
Copy link
Contributor

App Update Feature

Overview

Checks if a newer app version is available and prompts the user to update. Supports:

  • Force updates: user must update
  • Flexible updates: user can dismiss or skip

How It Works

  • On app launch, AppUpdateStore.checkForUpdate() is called
  • It fetches version info from the API and loads any ignored version from local storage
  • Before navigating, the router checks shouldShowUpdateScreen
  • If an update is required, the user is redirected to /update

Update Options

Depending on the update type and API flags, the user may see:

  • Update: Opens App Store / Play Store
  • Later: Dismisses for the current session only
  • Skip this version: Permanently ignores this specific version

Update Screen Behavior

Update Type Later Skip User Options
Force Update only
Flexible Update, Later
Flexible Update, Skip
Flexible Update, Later, Skip

API

Endpoint: GET /wallet-app/version-check.json

Response example:

{
  "version": "2.5.0",
  "release_notes": "- Bug fixes\n- Performance improvements",
  "show_later_button": true,
  "show_ignore_button": false,
  "platforms": ["android", "ios"],
  "update_urls": {
    "ios": "https://apps.apple.com/app/qubic-wallet/id6502265811",
    "android": "https://play.google.com/store/apps/details?id=org.qubic.wallet"
  }
}

Key Fields

  • version (required): Minimum required app version
  • release_notes: What’s new (supports line breaks)
  • show_later_button: Allows dismissing for session
  • show_ignore_button: Allows skipping this version permanently
  • platforms: Platforms the update applies to
  • update_urls: Store links per platform

User Dismissal Behavior

  • Later: Session-only, shown again on next launch
  • Skip this version: Stored permanently; newer versions will still prompt

Edge Cases

  • API failure or empty response → app continues normally
  • Platform not applicable → no update screen
  • Current version already valid → no update
  • Invalid version string → defaults to 0.0.0

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.

2 participants