moussa_updater 1.0.2 copy "moussa_updater: ^1.0.2" to clipboard
moussa_updater: ^1.0.2 copied to clipboard

Production-grade force update plugin (minVersion gate) with Play-only option and Android in-app update.

moussa_updater ๐Ÿš€ #

A production-grade Flutter plugin for enforcing mandatory app updates based on a minimum app version, with advanced Android support and safe behavior on all platforms.

Built for real production apps, not demos.


โœจ Features #

Platform support #

Platform Behavior
Android Google Play In-App Updates (Immediate / Flexible)
iOS Force update via App Store
Web Safe no-op (notSupported)
Windows Safe no-op
macOS Safe no-op
Linux Safe no-op

Force update logic #

  • Enforce minimum app version
  • Optional Play Store only enforcement (blocks APK installs)
  • Blocks outdated or unofficial builds
  • Fully controlled at runtime

๐Ÿ“ฆ Installation #

Add the dependency to your pubspec.yaml:

dependencies:
  moussa_updater: ^1.0.1

It is recommended to call checkAndMaybeUpdate during app startup (e.g. Splash screen) before allowing the user to continue.

Example:

final result = await MoussaUpdater.checkAndMaybeUpdate(
  minVersion: '2.3.0',
  androidUpdateMode: AndroidUpdateMode.immediate,
  androidPackageId: 'com.example.app',
  iosAppId: '1234567890',
  playOnly: true,
  context: context,
);

๐Ÿ” Android Update Modes #

AndroidUpdateMode.immediate

Mandatory blocking update.

AndroidUpdateMode.flexible

Background download with manual installation.

Important: Android In-App Updates only work when the app is installed from Google Play (internal, closed, or production tracks).


๐Ÿ›ก๏ธ Play Store Only Enforcement #

playOnly: true

When enabled, the plugin will block any non-Play Store installation (APK or sideload), even if the version number is valid.

Scenarios:

  • APK / sideload install โ†’ Blocked
  • Google Play install โ†’ Allowed
  • Below minimum version โ†’ Forced update

๐Ÿง  Returned Actions #

Possible MoussaAction values:

  • upToDate โ†’ app may continue normally
  • updateStarted โ†’ Android in-app update flow started
  • forceBlocked โ†’ user must update before continuing
  • openStore โ†’ fallback to store page
  • notSupported โ†’ Web / Desktop platforms (safe no-op)
  • error โ†’ unexpected failure

๐Ÿงฉ Platform Safety #

moussa_updater is designed to be safe in multi-platform Flutter projects.

  • Automatically disables itself on unsupported platforms
  • No crashes on Web, Windows, macOS, or Linux
  • Gracefully handles missing native implementations
  • Suitable for apps targeting mobile, desktop, and web

๐Ÿงช Testing #

This plugin relies on native platform services (Google Play Core and Apple App Store).

Automated Flutter unit or integration tests are not reliable for this type of plugin.

Recommended testing approaches:

  • Google Play Internal Testing
  • TestFlight (iOS)
  • Manual verification during release rollout

๐Ÿ“„ License #

MIT License ยฉ 2025 MoussaIT
Developed by Mostafa Azazy

See the LICENSE file for full details.


๐Ÿ‘จโ€๐Ÿ’ป Author #

Mostafa Azazy
Principal Mobile Engineer
MoussaIT


โญ Contributions #

Contributions are welcome if they:

  • Improve production stability
  • Keep the API clean and minimal
  • Avoid demo-only or experimental logic
1
likes
160
points
16
downloads

Publisher

unverified uploader

Weekly Downloads

Production-grade force update plugin (minVersion gate) with Play-only option and Android in-app update.

Repository (GitHub)
View/report issues

Topics

#flutter-plugin #update #in-app-update #play-store #force-update

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on moussa_updater

Packages that implement moussa_updater