Skip to content

pretolio/custom_force_update

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

forceupdate

This package is use for check new version available both ios and android. If it has a new version, you can link to app store or play store. But you need to know app id in store first.

See more at the Dart Packages page.

Screenshots!

IOS

Thanks to Edouard Marquez for adding the iOS functionality.

For iOS 9 and above, your Info.plist file MUST have the following:

<key>LSApplicationQueriesSchemes</key>
<array>
        <string>itms-beta</string>
        <string>itms</string>
</array>

Installation

Add force_update as a dependency in your pubspec.yaml file.

      forceupdate: ^0.0.5

Usage

In main.dart (or wherever your app is initialized), create an instance of CheckVersion using your current build context. final checkVersion = CheckVersion(context: context);. Then now you can get app version status by add this line :

final appStatus = await checkVersion.getVersionStatus();
if (appStatus.canUpdate) {
      checkVersion.showUpdateDialog(
          "com.companyName.projectName", "id1234567890");
}
    print("canUpdate ${appStatus.canUpdate}");
    print("localVersion ${appStatus.localVersion}");
    print("appStoreLink ${appStatus.appStoreUrl}");
    print("storeVersion ${appStatus.storeVersion}");

force_update

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published