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

Check Update first when app downloaded from play store. #92

Closed
ghost opened this issue Jan 18, 2016 · 7 comments
Closed

Check Update first when app downloaded from play store. #92

ghost opened this issue Jan 18, 2016 · 7 comments

Comments

@ghost
Copy link

ghost commented Jan 18, 2016

The user downloads the app from play store, and I have updated the files on the server and changed the manifest and json file.
On the first run of the app only, the user view the old app files. So, is there any setting that the app updates the files then load the app.
Since, it is highly irregular that the app is downloading from the play store and still updating.

@nikDemyankov
Copy link
Member

When user updates the app from the store - on the first run plugin shows content from the bundled www folder and installs it on the external storage. It does that like so, because when you update the app - it can have some additional plugins/Cordova files, and plugin need to install them also on the external storage.

Besides installing new web content on the server - you need to bundle it in the app, so it would be displayed on the start.

@manusis
Copy link

manusis commented Feb 22, 2016

Hi nikDemyankov,

The problem is that App Store takes 2-3 weeks for any update to become live. If we wait for app store to deploy the changes for that long then purpose of hot code push is lost.

We can live with existing user seeing the old app first and then seeing the new app.

But for users who just downloaded the app from App Store, it would be very bad user experience to show them an older version first and then show the newer version after restart/wake.

So what is needed here is an option that when enabled, will not only copy the content from bundled www folder to external storage but also check for any update on the server at the same time and install them as well. That will make the plugin really useful.

Thanks,
Rajiv

@nikDemyankov
Copy link
Member

Hi @manusis ,

But what to show to user while plugin is checking for update and installing it? In someones case it might be just a spinner on the white background, in other - splash screen, in your - something totally different. Plugin can't implement all the possible versions. So If you don't want to show to the new users old app content - you can just bundle in the application index page with loading progress you need, and that's it. When application is installed and launched - user will see the loading page you have bundled, and when update is loaded and installed - plugin will reload index page and he will see the new content. You can extend this logic anyway you want for different users.

@diegodotta
Copy link

Yeah @manusis, the time to copy to storage and only after that check/download new files it's hard. (My app has 40mb)

In my case, I want to do same A/B Tests in the firsts screens, and this plugin helps me to change the A/B tests live. I tried to put the spinner but the copy takes to long, so I quit this tests for the firsts screens.

And how about invert the proccess @nikDemyankov, download the new files and after that copy only the unchanged files from original app? Bizarre?

@nikDemyankov
Copy link
Member

nikDemyankov commented May 23, 2016

And how about invert the proccess @nikDemyankov, download the new files and after that copy only the unchanged files from original app? Bizarre?

@diegodotta it worked like that before v1.2.0, but that approach has several issues:

  1. Less secure for the user: since the working directory is, basically, the same as the update directory - if something goes wrong - it will break up everything, so the user will have to re-install the app. With new release -> new folder approach that is not a case anymore.
  2. If you update css/images - after reloading the page you might not see the changes, although the files has changed on file system. The problem is that url to these files has not changed, and WebView is using cached in memory version. And there are only 2 way to solve it: either change the url, or force-kill the app. With new release -> new folder approach that issue is solved automatically.

So, now it does download only new/changed files, but it has to create a new release folder for it, where files from the previous release are copied.

As I described in other issue - you can try different approaches to solve the problem with 40mb app size.

@diegodotta
Copy link

Right @nikDemyankov, thanks!

@nordnet-deprecation-bot
Copy link
Contributor

👋 Hi! Thank you for your interest in this repo.

😢 We are not using nordnet/cordova-hot-code-push anymore, and we lack the manpower and the experience needed to maintain it. We are aware of the inconveniece that this may cause you. Feel free to use it as is, or create your own fork.

🔒 This will now be closed & locked.

ℹ️ Please see #371 for more information.

@nordnet nordnet locked and limited conversation to collaborators Sep 19, 2018
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

4 participants