Skip to content

feat: Add app update detection and improve profile accessibility

Choose a tag to compare

@neryad neryad released this 10 May 22:49
· 43 commits to master since this release
9157040

Summary

This PR adds two improvements to the app:

  1. App Update Detection System — Users are automatically notified when a new version is available on the App Store/Play Store, with options to update now or dismiss. Major version updates (e.g., 1.x → 2.x) force the update modal without a dismiss button.

  2. Profile Icon on All Tabs — The profile info button is now accessible from every main tab (Home, Discover, Friends, Stats) instead of just the home screen, improving navigation UX.

Changes

New Files

  • src/hooks/useAppUpdateCheck.ts — Hook to detect app updates using react-native-version-check
  • src/components/UpdateModal.tsx — Modal component for update notifications
  • src/types/react-native-version-check.d.ts — TypeScript type declarations

Modified Files

  • app/_layout.tsx — Integrated UpdateModal in root layout
  • app/(tabs)/index.tsx — Profile icon already present (no changes needed)
  • app/(tabs)/friends.tsx — Added profile info button to header
  • app/(tabs)/discover.tsx — Added profile info button to header
  • app/(tabs)/stats.tsx — Added profile info button to header
  • app.json — Version bumped to 1.3.0

Features

Update Detection

✅ Checks App Store/Play Store for newer versions
✅ 24-hour cooldown for minor/patch updates (respects user dismissals)
✅ Major version updates always prompt (no dismiss option)
✅ Graceful fallback if network fails — never breaks the app
✅ Supports both iOS and Android

Profile Accessibility

✅ Profile button now accessible from 4 tabs instead of 1
✅ Consistent header icon styling across all screens
✅ Uses existing AboutModal for consistency

Notes

  • react-native-version-check requires native build (expo run:android / expo run:ios), not Expo Go
  • iOS App Store ID is hardcoded in the hook; update if needed
  • Version check happens silently in the background — no errors shown to users if store lookup fails