1
votes

How does IBM MobileFirst detect what is the type of application update (Direct Update , Version Update)

I want to keep my JSONstore data while minor update (direct update - Upgrade app from v1.01 to v1.02. )

I want to destroy my JSONstore data while major update (version update - Upgrade app from v1.01 to v2.00.)

Any suggestion to perform this function ? Any API to get current version of App ?

1

1 Answers

1
votes

The framework checks for Direct Update by comparing a checksum value of the web resources that reside in the application and the web resources that reside in the server. If they differ, then there will be a Direct Update.

There is no check between major version numbers (1.0 and 2.0), as that update is done via the update mechanism provided by the various app stores.

What you could do store either in your JSONStore or using HTML5 LocalStorage the current version of your application, and when you release a new version then to add logic in your app to compare the existing version with the new version and act upon based on the result.