Plugin Quickstart

This page provides a comprehensive overview of the capabilities that users can unlock with Plugins in App Maker. By following a few straightforward steps, users can effortlessly create, publish, and utilize Plugins from projects beyond their own. Whether it's building custom functionalities or integrating third-party tools, the power of Plugins empowers users to enhance their App Maker experience effortlessly.

1

Create Plugin

To create the development environment for users to create their plugin, the following command should be executed in the project's root directory :

$ appmaker plugin create

Plugin names must be unique and comply with the akinon-react-native-camera formatting. Users can find the plugins they have created stored under the .plugins directory within the project.

2

Installation Scripts

All changes that will affect project files must be developed within the ./plugins/YOUR_PLUGIN_NAME/installation directory, specifically within the android and iOS files. For more information, please refer to here.

3

Run Installation Scripts

To run the scripts developed on the installation layer, follow these two steps:

  1. First, execute the command plugin preview to preview the type of diff installation scripts will generate in project files. Use the following commands for Android and iOS respectively:

$ appmaker plugin preview android
$ appmaker plugin preview ios
  1. After ensuring that installation scripts are running properly, users can proceed to edit the project files. To do this, run the command plugin run:

$ appmaker plugin run android
$ appmaker plugin run ios

To execute the plugin's Post Install scripts, simply add the —-post-install parameter.

4

Integration

All integrations intended for the JavaScript scope, particularly Framework Services like Analytics and DeepLing, should be developed exclusively within this layer. For more information, please refer to here.

5

Publish Plugin

1. Privacy Settings

In the ./plugins/YOUR_PLUGIN_NAME/package.json file, choose whether the plugin to be published is private by setting the private field to either true or false.

{
  "private": true // or "false" depending on your preference
}

2. Plugin Pack

Navigate to the directory ./plugins/YOUR_PLUGIN_NAME/ and pack the plugin in order to publish it on App Maker.

$ appmaker plugin pack --major|--minor|--patch

3. Plugin Publish

Next, go to the directory ./plugins/YOUR_PLUGIN_NAME/ and publish the plugin on App Maker using the following command:

$ appmaker plugin publish
6

Add Plugin

If the user wants to include a plugin that was developed for another project (different from their own), they need to follow these steps:

  1. Clone the Plugin: Clone the plugin's repository into the .plugins directory located within the main directory of the current project.

  2. Run the plugin add Command: After cloning the plugin, use the following command to add the plugin to the current project.

$ appmaker plugin add <name>

For more information on how to use the appmaker plugin command, refer to the Plugin Command section.

Last updated

Was this helpful?