cordova-plugin-code-push icon indicating copy to clipboard operation
cordova-plugin-code-push copied to clipboard

How do i show the current CodePush Version label in my app

Open mohamedMobileSpot opened this issue 5 years ago • 4 comments

Additional Information

cordova-plugin-code-push version: 1.13.1 "cordova-plugin-whitelist": "^1.3.4", "code-push": "^3.0.1", "cordova-android": "^8.0.0",

mohamedMobileSpot avatar Sep 15 '20 07:09 mohamedMobileSpot

To show the version of the currently installed codepush update, use codePush.getCurrentPackage. See the docs here https://github.com/microsoft/cordova-plugin-code-push#codepushgetcurrentpackage

szh avatar Sep 15 '20 14:09 szh

To show the version of the currently installed codepush update, use codePush.getCurrentPackage. See the docs here https://github.com/microsoft/cordova-plugin-code-push#codepushgetcurrentpackage

i know that codePush.checkForUpdate and codePush.getCurrentPackage function give me the localPackage information but they only give the current information only if the binary code is from code push but for my case i want it evry time i need it even when the app is loaded from store not updated from code push

mohamedMobileSpot avatar Sep 15 '20 15:09 mohamedMobileSpot

In case of cordova platform

  • when you use codepush.sync() or codepush.checkForUpdate()
  • get details about the updates by codePush.getCurrentPackage()
  • to store and retrive required information in entire app use localStorage
  • Window.localStorage

PRA1995SAG avatar Sep 21 '20 08:09 PRA1995SAG

In case of cordova platform

  • when you use codepush.sync() or codepush.checkForUpdate()
  • get details about the updates by codePush.getCurrentPackage()
  • to store and retrive required information in entire app use localStorage
  • Window.localStorage

thank you for the solution i will test it 👍

mohamedMobileSpot avatar Sep 21 '20 08:09 mohamedMobileSpot