Force Update / App Update
Implement version checking and in-app update prompts to keep users on supported app versions.
When to Use This Skill
- Adding force update functionality to block outdated versions
- Implementing soft update prompts for optional updates
- Setting up Android In-App Updates for seamless upgrades
- Configuring version management via Supabase or Firebase Remote Config
- User asks "force update", "app update", "version check", or "update dialog"
When NOT to Use This Skill
- OTA code updates (Flutter doesn't support this like React Native) - Use store updates
- App store submission process - Use
/release instead
- CI/CD build versioning - Use
/ci-cd instead
Questions to Ask
- Update strategy: Force update only, soft update only, or both?
- Backend: Supabase, Firebase Remote Config, or custom REST API?
- Android In-App Updates: Enable flexible/immediate updates via Play Store?
- Minimum version logic: Per-platform, per-feature, or global minimum?
Quick Reference
Update Types
| Type |
Behavior |
When to Use |
| Force Update |
Blocks app until updated |
Security fixes, breaking API changes |
| Soft Update |
Dismissible prompt |
New features, minor improvements |
| In-App Update (Android) |
Download without leaving app |
Any update, better UX |
| Maintenance Mode |
Blocks app entirely |
Server downtime, critical issues |
Version Comparison
| Current |
Minimum |
Force Min |
Result |
| 1.0.0 |
1.2.0 |
1.1.0 |
Force update required |
| 1.1.5 |
1.2.0 |
1.1.0 |
Soft update available |
| 1.2.0 |
1.2.0 |
1.1.0 |
Up to date |
Commands
# Validate force-update implementation
dart run .claude/skills/force-update/scripts/check.dart
# Check specific aspects
dart run .claude/skills/force-update/scripts/check.dart --check version-service
dart run .claude/skills/force-update/scripts/check.dart --check dialogs
Workflow
Phase 1: Setup Dependencies
Add required packages to pubspec.yaml:
package_info_plus - Get current app version
in_app_update (Android only) - Play Store in-app updates
url_launcher - Open app stores
Configure version source (choose one):
- Supabase: Create
app_versions table
- Firebase Remote Config: Add version parameters
Phase 2: Implement Version Service
- Create
AppVersionService in lib/core/services/
- Implement version comparison logic (semantic versioning)
- Add platform-specific store URLs
- Create
VersionInfo model with Freezed
Phase 3: Add Update UI
- Create
ForceUpdateScreen - Full-screen blocker
- Create
SoftUpdateDialog - Dismissible bottom sheet
- Create
MaintenanceScreen - Server downtime blocker
- Implement
UpdateNotifier with Riverpod
Phase 4: Integrate Check
- Add version check to app startup (
main.dart or splash)
- Handle background-to-foreground transitions
- Configure periodic checks for long sessions
Phase 5: Android In-App Updates (Optional)
- Implement
InAppUpdateService wrapper
- Choose update type: flexible (background) or immediate (blocking)
- Handle download progress and install prompts
Core API
See: reference/ for complete implementations. Basic usage:
final versionInfo = await ref.read(versionServiceProvider).checkVersion();
// Handle: versionInfo.status (upToDate, softUpdateAvailable, forceUpdateRequired, maintenanceMode)
File Structure
After using this skill:
lib/
├── core/
│ └── services/
│ ├── app_version_service.dart
│ └── in_app_update_service.dart # Android only
└── features/
└── force_update/
├── domain/
│ ├── entities/
│ │ └── version_info.dart
│ └── enums/
│ └── update_status.dart
├── data/
│ ├── models/
│ │ └── version_info_dto.dart
│ └── repositories/
│ └── version_repository_impl.dart
└── presentation/
├── screens/
│ ├── force_update_screen.dart
│ └── maintenance_screen.dart
├── widgets/
│ └── soft_update_dialog.dart
└── providers/
└── update_notifier.dart
Failure Types
| Type |
When |
UI Action |
VersionCheckFailure |
Network error checking version |
Retry or continue (configurable) |
StoreOpenFailure |
Can't open app store |
Show manual store link |
InAppUpdateFailure |
Android update download failed |
Fallback to store redirect |
Guides
| File |
Content |
| version-checking-guide.md |
Backend setup, version comparison logic |
| update-dialogs-guide.md |
Dialog behavior, frequency limits, back prevention |
| in-app-updates-guide.md |
Android Play Store in-app updates |
Reference Files
See: reference/ for complete implementations:
reference/entities/ - VersionInfo, UpdateStatus
reference/services/ - AppVersionService, InAppUpdateService
reference/providers/ - UpdateNotifier with Riverpod
reference/screens/ - ForceUpdateScreen, MaintenanceScreen
reference/widgets/ - SoftUpdateDialog
Checklist
Backend Setup:
Version Service:
Update UI:
Integration:
Android In-App Updates (if enabled):
Related Skills
/release - App store preparation and signing
/ci-cd - Build versioning and deployment
/analytics - Track update prompt interactions
/i18n - Localize update dialog strings
/design - Polish update screen UI
/a11y - Add accessibility to update screens
Common Issues
See: version-checking-guide.md for error handling, caching, and troubleshooting.
Key points:
- Use timeout on version checks to avoid blocking app launch
- iOS store URL format:
https://apps.apple.com/app/id{APP_ID}
- Android In-App Updates only work with Play Store installs
Next Steps
After implementing force update:
/i18n - Localize all user-facing strings
/design - Polish UI, loading states, visual feedback
/a11y - Add semantic labels, ensure accessibility
/analytics - Add update prompt tracking events
/ci-cd - Automate version bumping in CI
1---2name: force-update3description: Implement in-app update prompts with version checking, force/soft updates, Android In-App Updates, and store redirects. Supports Supabase and Firebase Remote Config backends. Use when adding update dialogs, version management, or blocking outdated app versions.4---56# Force Update / App Update78Implement version checking and in-app update prompts to keep users on supported app versions.910## When to Use This Skill1112- Adding force update functionality to block outdated versions13- Implementing soft update prompts for optional updates14- Setting up Android In-App Updates for seamless upgrades15- Configuring version management via Supabase or Firebase Remote Config16- User asks "force update", "app update", "version check", or "update dialog"1718## When NOT to Use This Skill1920- OTA code updates (Flutter doesn't support this like React Native) - Use store updates21- App store submission process - Use `/release` instead22- CI/CD build versioning - Use `/ci-cd` instead2324## Questions to Ask25261. **Update strategy:** Force update only, soft update only, or both?272. **Backend:** Supabase, Firebase Remote Config, or custom REST API?283. **Android In-App Updates:** Enable flexible/immediate updates via Play Store?294. **Minimum version logic:** Per-platform, per-feature, or global minimum?3031## Quick Reference3233### Update Types3435| Type | Behavior | When to Use |36|------|----------|-------------|37| **Force Update** | Blocks app until updated | Security fixes, breaking API changes |38| **Soft Update** | Dismissible prompt | New features, minor improvements |39| **In-App Update (Android)** | Download without leaving app | Any update, better UX |40| **Maintenance Mode** | Blocks app entirely | Server downtime, critical issues |4142### Version Comparison4344| Current | Minimum | Force Min | Result |45|---------|---------|-----------|--------|46| 1.0.0 | 1.2.0 | 1.1.0 | Force update required |47| 1.1.5 | 1.2.0 | 1.1.0 | Soft update available |48| 1.2.0 | 1.2.0 | 1.1.0 | Up to date |4950### Commands5152```bash53# Validate force-update implementation54dart run .claude/skills/force-update/scripts/check.dart5556# Check specific aspects57dart run .claude/skills/force-update/scripts/check.dart --check version-service58dart run .claude/skills/force-update/scripts/check.dart --check dialogs59```6061## Workflow6263### Phase 1: Setup Dependencies64651. Add required packages to `pubspec.yaml`:66 - `package_info_plus` - Get current app version67 - `in_app_update` (Android only) - Play Store in-app updates68 - `url_launcher` - Open app stores69702. Configure version source (choose one):71 - **Supabase:** Create `app_versions` table72 - **Firebase Remote Config:** Add version parameters7374### Phase 2: Implement Version Service75761. Create `AppVersionService` in `lib/core/services/`772. Implement version comparison logic (semantic versioning)783. Add platform-specific store URLs794. Create `VersionInfo` model with Freezed8081### Phase 3: Add Update UI82831. Create `ForceUpdateScreen` - Full-screen blocker842. Create `SoftUpdateDialog` - Dismissible bottom sheet853. Create `MaintenanceScreen` - Server downtime blocker864. Implement `UpdateNotifier` with Riverpod8788### Phase 4: Integrate Check89901. Add version check to app startup (`main.dart` or splash)912. Handle background-to-foreground transitions923. Configure periodic checks for long sessions9394### Phase 5: Android In-App Updates (Optional)95961. Implement `InAppUpdateService` wrapper972. Choose update type: flexible (background) or immediate (blocking)983. Handle download progress and install prompts99100## Core API101102**See:** `reference/` for complete implementations. Basic usage:103104```dart105final versionInfo = await ref.read(versionServiceProvider).checkVersion();106// Handle: versionInfo.status (upToDate, softUpdateAvailable, forceUpdateRequired, maintenanceMode)107```108109## File Structure110111After using this skill:112113```114lib/115├── core/116│ └── services/117│ ├── app_version_service.dart118│ └── in_app_update_service.dart # Android only119└── features/120 └── force_update/121 ├── domain/122 │ ├── entities/123 │ │ └── version_info.dart124 │ └── enums/125 │ └── update_status.dart126 ├── data/127 │ ├── models/128 │ │ └── version_info_dto.dart129 │ └── repositories/130 │ └── version_repository_impl.dart131 └── presentation/132 ├── screens/133 │ ├── force_update_screen.dart134 │ └── maintenance_screen.dart135 ├── widgets/136 │ └── soft_update_dialog.dart137 └── providers/138 └── update_notifier.dart139```140141## Failure Types142143| Type | When | UI Action |144|------|------|-----------|145| `VersionCheckFailure` | Network error checking version | Retry or continue (configurable) |146| `StoreOpenFailure` | Can't open app store | Show manual store link |147| `InAppUpdateFailure` | Android update download failed | Fallback to store redirect |148149## Guides150151| File | Content |152|------|---------|153| [version-checking-guide.md](version-checking-guide.md) | Backend setup, version comparison logic |154| [update-dialogs-guide.md](update-dialogs-guide.md) | Dialog behavior, frequency limits, back prevention |155| [in-app-updates-guide.md](in-app-updates-guide.md) | Android Play Store in-app updates |156157## Reference Files158159**See:** `reference/` for complete implementations:160161- `reference/entities/` - VersionInfo, UpdateStatus162- `reference/services/` - AppVersionService, InAppUpdateService163- `reference/providers/` - UpdateNotifier with Riverpod164- `reference/screens/` - ForceUpdateScreen, MaintenanceScreen165- `reference/widgets/` - SoftUpdateDialog166167## Checklist168169**Backend Setup:**170- [ ] Version endpoint configured (Supabase table or Remote Config)171- [ ] Minimum version field set172- [ ] Force minimum version field set173- [ ] Platform-specific versions if needed (iOS/Android)174175**Version Service:**176- [ ] `package_info_plus` added to dependencies177- [ ] `AppVersionService` created178- [ ] Semantic version comparison implemented179- [ ] Store URLs configured for both platforms180181**Update UI:**182- [ ] `ForceUpdateScreen` implemented (non-dismissible)183- [ ] `SoftUpdateDialog` implemented (dismissible)184- [ ] `MaintenanceScreen` implemented185- [ ] Update button opens correct store186187**Integration:**188- [ ] Version check runs on app startup189- [ ] Version check runs on foreground resume190- [ ] Error handling for network failures191- [ ] Analytics events for update prompts192193**Android In-App Updates (if enabled):**194- [ ] `in_app_update` package added195- [ ] `InAppUpdateService` wrapper created196- [ ] Flexible vs immediate strategy chosen197- [ ] Download progress UI implemented198199## Related Skills200201- `/release` - App store preparation and signing202- `/ci-cd` - Build versioning and deployment203- `/analytics` - Track update prompt interactions204- `/i18n` - Localize update dialog strings205- `/design` - Polish update screen UI206- `/a11y` - Add accessibility to update screens207208## Common Issues209210**See:** [version-checking-guide.md](version-checking-guide.md) for error handling, caching, and troubleshooting.211212Key points:213- Use timeout on version checks to avoid blocking app launch214- iOS store URL format: `https://apps.apple.com/app/id{APP_ID}`215- Android In-App Updates only work with Play Store installs216217## Next Steps218219After implementing force update:2201. `/i18n` - Localize all user-facing strings2212. `/design` - Polish UI, loading states, visual feedback2223. `/a11y` - Add semantic labels, ensure accessibility2234. `/analytics` - Add update prompt tracking events2245. `/ci-cd` - Automate version bumping in CI