Repository navigation
feat: Add app update detection and improve profile accessibility
Summary
This PR adds two improvements to the app:
-
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.
-
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-checksrc/components/UpdateModal.tsx— Modal component for update notificationssrc/types/react-native-version-check.d.ts— TypeScript type declarations
Modified Files
app/_layout.tsx— Integrated UpdateModal in root layoutapp/(tabs)/index.tsx— Profile icon already present (no changes needed)app/(tabs)/friends.tsx— Added profile info button to headerapp/(tabs)/discover.tsx— Added profile info button to headerapp/(tabs)/stats.tsx— Added profile info button to headerapp.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-checkrequires 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