Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

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

Open
mohamedMobileSpot opened this issue Sep 15, 2020 · 4 comments
Open

Comments

@mohamedMobileSpot
Copy link

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",

@szh
Copy link

szh commented Sep 15, 2020

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

@mohamedMobileSpot
Copy link
Author

mohamedMobileSpot commented Sep 15, 2020

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

@PRA1995SAG
Copy link

PRA1995SAG commented Sep 21, 2020

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

@mohamedMobileSpot
Copy link
Author

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 👍

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants