Skip to content

Deploying to Mobile Services

This topic describes the steps to deploy the generated bundle.js and bundle.js.map to mobile services.

Prerequisites

The identity provider configured for mobile services admin APIs must support basic authentication.

Context

Use these steps to deploy the generated bundle.js and bundle.js.map to mobile services.

Procedure

  1. Set the mobile services admin API and app ID in the settings.json file, using the user setting mdk.mobileservice.

    {
      "mdk.mobileservice": {
        "adminAPI": "",
        "appId": ""
      }
    }
    

    You can add this user setting at three levels: Folder, Workspace, and User levels, with the former one at higher priority.

  2. To trigger the deploy command, perform one of the following sub steps. Select MDK:Deploy menu item to trigger the deploy command.

    • In file explorer panel, right click on node Application.app and select the menu item MDK:Deploy.
    • In command palette, select MDK:Deploy.
  3. Provide the username and password for mobile services admin API to complete the deployment.

    User name and password for mobile services admin API is not required for each deployment. In other words, after providing the user name and password for the first deployment, a session is established between Visual studio code and mobile services. During the lifecycle of the session, the provided user name and password remains active.

    If successful, the deployment revision number is displayed, else an error message is displayed.


Last update: November 18, 2022