1.1.2 • Published 4 years ago

@abitofsoftware/capacitor-check-app-update v1.1.2

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

Capacitor Check App Update

Check the App and Play store for app updates!

Installation

npm install --save @abitofsoftware/capacitor-check-app-update

Android

Add the plugin to the MainActivity in the Android project

import com.abitofsoftware.checkappupdate.CheckAppUpdatePlugin;

public class MainActivity extends BridgeActivity {
  @Override
  public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);

    // Initializes the Bridge
    this.init(savedInstanceState, new ArrayList<Class<? extends Plugin>>() {{
      // Additional plugins you've installed go here
      add(CheckAppUpdatePlugin.class);
    }});
  }
}

iOS

If your app is only available in certain countries, you should add the (generic) locale option (e.g. Netherlands = 'nl')'.

Usage

import {CheckAppUpdate} from "@abitofsoftware/capacitor-check-app-update";
const checkAppUpdate = new CheckAppUpdate();

checkAppUpdate.canUpdate({locale: 'nl'}) // Only fill in the locale if necessary as mentioned in the docs.
        .then((updateAvailable) => {
          if (updateAvailable.value) {
            console.log('Update available!');
          } else {
            console.log('No update available');
          }
        });
1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago