Hot update....when we reinstall app, previous hot updated files still there and interfere with app

@pandamicro, @Randomzord, @huanxinyin

i was able to make hot update work but i have a problem. let’s say i install ver 1 and hot update to ver 2.
then i uninstall the app and later install ver 3.
the problem is that the files in hot update(ver 2) are still on my device and they override the ver 3 files i just installed.
how do i make sure the old files are deleted and ver 3 runs on my device?

Just to be sure, is this what you mean?

  • Install base app with ver 1
  • Hot update it to ver 2
  • Uninstall
  • Install a new base app, now with ver 3
  • Hot update it to ver 2

If it is so, check the version of the base manifest file, and the compare function.

And remember, you can always debug in native to see what’s going on

i meant i install ver 1
hot update it to ver 2
install a new base app, now with ver 3

in this case i was still seeing ver 2.

now i can try to solve my problem myself. i just need to clarify some points… the hot update initially(before restart) stored in getWritablePath+“hotUpdateAssets/_temp”?
is it ever the case that before restart the files are not in the _temp folder?
2. should the fileUtils search paths contain the path of the current location of the update files? what else does it contain?


Yeah, that was the flux that I meant :laughing:

So, the problem probably is that. The manifest that goes inside the app has a variable version in it, that usually is, so everything that was on the server is newer. If the local version can be newer than the remote one (that shoudn’t be), then the version of the local manifest should be updated to.

  1. Dont Know, I think that only the Engine Team member can answer that.
  2. Same as above, but AFAIK, the search paths are empty by default, that line that you add in the main.js file adds the hot update file’s path into it.

What cocos creator version you are using? What platform present this issue?

I think the update resource wasn’t be clear up, but it’s usually erased on uninstallation.