Make sure to first setup your computer for trinity.
Open a terminal at the location you want your application to be created. A subfolder will be created for you. Then run the following command
$ trinity-cli new
Provide a few information such as your app name, package name, author information, and a new folder will be created with your DApp.
The created application uses the ionic framework. It simply embeds an additional manifest.json file to be considered as a trinity application.
In case you already have a ionic application, and would like to run it inside trinity, you have to generate a trinity manifest to make it become compatible.
Enter your ionic app’s folder then run the following command:
$ trinity-cli manifest
For more detail about Ionic, please visit here. You can build any kind of ionic-based application in Elastos, as the whole ionic framework is available. In addition, Elastos plugins are available too, such as carrier, hive, or access to payments and digital identities (DID).
Enter your app’s folder in a terminal then run the following command:
$ trinity-cli run -p android
That will package your application as a EPK file, send it to your device, install it inside Trinity, and run it.
After your app is launched inside trinity, you can directly edit your app content from its src/ folder. Changes will automatically reload in trinity.
A manifest.json file is created by default in your trinity DApp project. You can manually edit it whenever needed. The Trinity manifest format is fully described in the trinity manifest guide.