How to Add a License Key to Your Vuforia Engine App

This article describes how to add a license key to your Vuforia Unity, Android, iOS, and UWP projects. Vuforia Engine apps use a unique license key obtained from the Vuforia Engine License Manager.  We strongly recommend developers encrypt their key for enhanced security. To learn how to create a license key, refer to the Vuforia License Manager article.

Adding a License Key to a Unity app

After opening your Unity project, perform the following steps:

  1. In the Window menu, select Vuforia Configuration.
  2. In the Inspector window, click the Add License button. 
    The License Manager window opens in a browser.
  3. Click on your project name.
    The My License window opens.
  4. Click the license key to copy it to your clipboard.
  5. In the Inspector window, paste the key into the App License Key field. 

Adding a License Key to a Native Vuforia Engine App

Use the AppController.cpp file in the Vuforia Engine Native Samples as a starting point. Use the following to initialize your license key. The licenseKey should be defined in the namespace of your app. Obtain the license key from the License Manager on the Vuforia Developer Portal and place it as the licenseKey that is empty by default in the Native Sample:

namespace
{
    constexpr char licenseKey[] = "";
}

The license key is used in the initiVuforiaInternal() method when calling Vuforia::setInitParatmeters(), which has a slightly different signature for each platform:

iOS
Vuforia::setInitParameters(mVuforiaInitFlags, licenseKey);

 

Android
Vuforia::setInitParameters(jobject(appData), mVuforiaInitFlags, licenseKey);

 

UWP
Vuforia::setInitParameters(licenseKey);

 

 

After setting the licenseKey in Vuforia::setInitParatmeters(), Vuforia Engine can be initialized asynchronously with Vuforia::init(). For full details, please refer to the Getting started pages or consult the AppController.h/cpp files in each native sample packages.

Related Topics

Vuforia License Manager

Vuforia Target Manager