SK7
SK7

Reputation: 641

Worklight direct update process

I wonder how direct update works. What is the full process (checksum, build version, etc.) that links the war, wlapp and the apk or the ipa files in order to show direct update notification when the application is launched?

Upvotes: 0

Views: 95

Answers (1)

Idan Adar
Idan Adar

Reputation: 44516

You can find this information about Direct Update in MobileFirst Platform Foundation 6.2 - 7.1, here: https://mobilefirstplatform.ibmcloud.com/tutorials/en/foundation/7.1/advanced-client-side-development/using-direct-update-to-quickly-update-your-application/

  • The .war file is not related to Direct Update
  • The .apk and .ipa (binary files) are not related either

Direct Update relates only to the web resources that are bundled in the Hybrid application.

When you want to make such an update you need to:

  1. Update the resources in your project
  2. Build the project, which generates an updated .wlapp file
  3. Deploy the updated .wlapp file

Now the server holds updated web resources for the application. As part of this a checksum value of the web resources is stored in the server. A similar checksum value is also stored in the application.

The next time the application attempts to connect to the server, be it via WL.Client.connect or an adapter request, the server will will compare the checksum value of the application (which is send as part of the request to the server) with the checksum value it has stored. If the values differ this means that the server will serve the updated web resources back to the application.

Notes:

  • If you are using MobileFirst Platform Foundation 7.1 the frequency of checking for an update is determined based on your token expiration value. Refer to the link above to learn more about this.

  • Direct Update works only on the same app version. i.e. if your application is at v1.0 and you want to update it using Direct Update, make sure that when building the application in MobileFirst Studio, the environment version is also set to 1.0. If your application is at a different version, Direct Update will not be done due to version mismatch.

Upvotes: 1

Related Questions