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

CheckForUpdate and determine if there is a new binary version #260

Closed
jgkinnear opened this issue Jun 28, 2017 · 4 comments · May be fixed by #669
Closed

CheckForUpdate and determine if there is a new binary version #260

jgkinnear opened this issue Jun 28, 2017 · 4 comments · May be fixed by #669
Labels

Comments

@jgkinnear
Copy link

Description

Is there a public method to determine if there is a new Binary version available? When checking for an update, the console logs
An update is available, but it is targeting a newer binary version than you are currently running.
but the calls internally
appUpToDate();

I would like to send the user to a URL to download the new binary version

Additional Information

  • cordova-plugin-code-push version: 2.0.1-beta
  • Cordova version: 6.4.0
  • Does this reproduce on a simulator, or only on a physical device? Both
@max-mironov
Copy link
Contributor

Hi @jgkinnear, that a good question. Currently we do not have an API method to verify this.
So probably you could try to do one of the following things to get your requirements:

  1. Add an additional callback function to checkForUpdate method and rise this callback e.g. after this LOC. If you could create a PR that implements this and update docs - that would be much appreciated.
  2. You could try to import some stuff from cordova-plugin-code-push, say you need to import
    class Sdk and class LocalPackage and try to write you custom function reflecting the same logic we do in checkForUpdate method. So this way you should be available to implement your custom handling there.

Please let us know if you have any questions regarding this.

@sergey-akhalkov
Copy link
Contributor

sergey-akhalkov commented Jun 28, 2017

Hi @jgkinnear, please also take a look at the similar PR here microsoft/react-native-code-push#888 - it could help you. And especially pay attantion on microsoft/react-native-code-push#888 (comment)

@max-mironov
Copy link
Contributor

@jgkinnear - we believe that we can close the issue if you do not have any questions at that moment. Do not hesitate to reopen the ticket if needed.

@jgkinnear
Copy link
Author

Thanks for the information @sergey-akhalkov and @max-mironov, appreciated!

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

Successfully merging a pull request may close this issue.

3 participants