Skip to content

Creating and Bundling Extensions

For Mobile Development Kit Client 4.0 version onward, there’s support for creation and bundling of extensions in metadata project.

Extensions in a metadata project are bundled into the generated bundle.js. So, for any changes in extensions, only the new generated bundle.js must be synced to the mobile device via mobile service without reinstalling the client on mobile device. However, there should be no native code in the extensions.

Overview about creation, bundling, running, and debugging extensions in metadata project:

Creation

  • An Extensions folder is created in the new s application.
  • Select the Extensions folder and invoke the context menu item MDK: New Extension, the wizard guides you through the creation process.

Bundling

This process behaves the same as before and is transparent to users. For more information on bundling, see Bundling Apps

Note

For successfully generating bundle.js, consider the following:

  • In your metadata project, change short imports to full imports for nativescript modules. The impacted files include all ts or js files.
  • Add module name to the user setting MDK: Bundler Externals.

Also note the changes applicable to rules development. See, NativeScript 6.0 and No more short imports in NativeScript.

Running and Debugging

Both running and debugging processes behave the same as earlier and is transparent to users.

Launch the Visual Studio Code editor to run the project. For detailed description on debugging, see Debugging Mobile Development Kit App with Visual Studio Code Debugger


Last update: August 12, 2020