Hot Update | Patch Update | Changing the remote package url dynamically | Soft Update | Update

Facing issue on patch update.

We did some changes on server end.
We released two patches - patch A1 and patch B1.

Two users (userA and UserB) get patch update request. Server checks if userA is requesting for patch or userB is requesting for patch. On the basis of this info userA is redirected to download patch A1 and userB is redirected to download patch B1.

The issue :-
Before the server can redirect user to download specific patches the browser cached data downloads the patch that we released a month ago. Hence the redirection is failed.

This is why i want to change the server remote package download url which is defined using version_generator.js script and is saved in project.manifest file.

The server will send url i will append it to the project.manifest file and then client will follow the patch update process.

Any leads on how to change the server remote package download url dynamically during runtime without pushing an apk update will be highly appreciated.

@zzy Do you have any idea on this situation?

you reply on my previous query - Hot Update | Patch Update | Changing the url dynamically during runtime

I dont understand why, If patch A1 and patch B1 have different url, there should be no cached data. Are you use forward rather than redirect? If it is try use redirect?

The url that a user hits when prompted for patch update is same for all. This is same url that we provided with version_generater.js

There are two patch files stored in server.
Whenever a user is prompted for patch update. The server checks if the request is coming from userA or userB on basis of their login info. Based on this information server redirects the url towards PatchA or PatchB.

Now due to the browser’s cache data the redirection sometimes fails.

i’m following this method for patch update - Cocos Creator 2.4 Manual - AssetManager for Hot Update

I get it.I heard that the demo code is not suitable for using in production environment. So we use different solution at the very beginning. So I am not familiar with the demo solution.
I have a briefly look at it. Perhaps you can add a new step before request remote version.manifest and project.manifest. Different situation get different urls of version.manifest and project.manifest. In manifest files, different version has different base url, in this situation there is no reason of having local cached data.

The query still remains unsolved – as how to get different urls of version.manifest and project.manifest. In manifest files based on different situations.

Currently the patch url is bundled with the apk. How to change the urls dynamically during runtime?

You can modified client end or server end?

The modifications needed on server end is done. The server will send the required url.

How to do it on client’s end?

Like the demo shows, you can read the content of manifest file as object or string, modify it as you want, then new jsb.Manifest(); loadLocalManifest()