Install the Cordova Plugin and Run the Examples

How to install the Craftar Pro Cordova Plugin for iOS and Android

In order to get started with the Craftar Pro Cordova Plugin for iOS and Android, we recommend you to run the examples included in the distribution that you can download upon request (see button above). The examples are located in the craftarsdkexamples directory as an Apache Cordova Project.

Getting the plugin

Our cordova plugins are published in the npm registry and can be installed through the cordova CLI. They are open-source and the code of the plugins can be in our bitbucket project for cordova.

Try the examples

The examples project for the Craftar Pro Cordova Plugin for iOS and Android can be found in bitbucket.

To get the examples and add the plugin, open a terminal and run the following command:

The examples app opens a menu view that allows you to open the different examples. Each example opens the camera and the first step is for you to scan any object. We provide a set of reference images to point at that show different experiences. You can find those images in the folder craftarsdkexamples/Reference images.

We strongly recommend that you print this images out for testing. Pointing at them in your laptop/PC’s screen can heavily alter the experience due to artefacts that are invisible to your naked eye but very disturbing when captured with your smartphone.



How to add the plugin to your project

If you want to add the plugin to your project, you just need to use the cordova CLI as follows:

How to migrate from an old plugin

If you were already using an older version of our plugin, you need to first remove the plugin, then, add the new version:

You may encounter some errors due to changes in the plugin’s API. We recommend that you review the class reference documentation that you can find linked in the page of the corresponding Cordova plugin if you can’t find the new methods/members.

How to remove the plugin from your project

In order to remove the plugin from your project, run the following commands:

How to use the plugin with ionic

The Craftar Pro Cordova Plugin for iOS and Android is compatible with ionic through its Javascript interface. You can follow this tutorial to see how to use the plugin with ionic. Note that our plugin is not included in Ionic Native.