+

Search Tips | Advanced Search

For up-to-date product documentation, see the IBM MobileFirst Foundation Developer Center.


Enabling the web resources checksum feature

Use the web resources checksum feature to verify the integrity of your cross-platform app.


Before you begin

When it is enabled, the web resources checksum feature compares the original web resources of an app when it is started to a stored baseline that was captured the first time that app was started. This is a good way of identifying any differences in the app that might indicate that the app was modified. This procedure is compatible with the Direct Update feature.

To enable the web resources checksum feature for a Cordova app, complete the following steps:


Procedure

  1. In a terminal window, navigate to the root directory of your target app.
  2. Enter the following command to enable the web resources checksum feature for an operating system environment of your Cordova app:

      mfpdev app config [android|ios|windows10|windows8|
      windowsphone8]_security_test_web_resources_checksum true

    For example:

      mfpdev app config android_security_test_web_resources_checksum true

    We can disable the feature by replacing true in the command with false.

    Tip: We can view information about the mfpdev app config command by entering mfpdev help app config.

  3. Enter the following command to identify the types of files that we want to ignore during the checksum test:

      mfpdev app config [android|ios|windows10|windows8|
      windowsphone8]_security_ignore_file_extensions [ file_extension1,file_extension2 ]

    Multiple extensions must be separated by a comma with no spaces between them. For example:

      mfpdev app config android_security_ignore_file_extensions jpg,png,pdf

    Important: Running this command overwrites the values that are set. The more files that the web resources checksum scans for its test, the longer it takes for the app to open. We can specify the extension of a file type to skip, which might improve the speed of starting the app.


Results

Your app has the web resources checksum feature enabled.


What to do next

  1. Run the following command to integrate the changes into the app:

      cordova prepare

  2. Build your app by entering the following command:

      cordova build

  3. Run your app by entering the following command:

      cordova run

Related concepts:

Command-line interface (CLI) help