+

Search Tips | Advanced Search

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


Create and deploying updated web resources to MobileFirst Server

To make modified web resources available to deployed client Cordova applications, you package and upload them as an archive (.zip file) to the MobileFirst Server.

We use either MobileFirst Platform CLI or MobileFirst Operations Console to perform procedures on the updated web resources package:

Parent topic: Update Cordova client apps directly


Create and deploying updated web resources to the default MobileFirst Server


Procedure

  1. From the command line, navigate to the root of the Cordova project.
  2. Run the command:

      mfpdev app webupdate

    The updated web resources are packaged to an archive and uploaded to the default MobileFirst Server that is running in the developer workstation. The packaged web resources are located in the <cordova-project-root-folder>/mobilefirst/ folder.

    The archive in the mobilefirst folder contains important metadata. It embeds the version of the cordova-plugin-mfp plug-in. Before it serves that archive to a mobile client, the server compares the client version with the plug-in version. If both versions are close enough (meaning that the three most significant digits are identical), Direct Update occurs normally. Otherwise, MobileFirst Server silently skips the update.


Create and deploying updated web resources to a non-default MobileFirst Server


Procedure

  1. Build the archive.
  2. Run the command:

      mfpdev app webupdate [server-name] [runtime-name]

    For example:

      mfpdev app webupdate myQAServer MyBankApps


Uploading a previously generated archive


Procedure

Run the command:

mfpdev app webupdate [server-name] [runtime-name] --file [path-to-packaged-web-resources] For example:

mfpdev app webupdate myQAServer MyBankApps --file mobilefirst/ios/com.mfp.myBankApp-1.0.1.zip


Uploading packaged web resources with the MobileFirst Operations Console


Procedure

  1. Build the archive.

    mfpdev app webupdate --build

  2. Display the MobileFirst Operations Console from the following URL:

    http://localhost:9080/mfpconsole/

    Figure 1. MobileFirst Operations Console for uploading an archive

    Shows how to upload a direct update archive in the console

  3. Click an application version in the navigation sidebar.
  4. Click Upload Web Resources Archive and in the file chooser that is displayed, choose the archive for upload.