Authenticating applications

Developers using Live Sense SDK with their app are required to register for a set of HERE credentials and to specify these credentials in the SDK.

To obtain these credentials, visit the developer portal at https://developer.here.com/plans and register for a license.

Note

For the available authentication options, see the Identity & Access Management Developer Guide.

Once your project is created, you can generate these credentials on your Project Details page. If you already have a plan, you can also retrieve these credentials from your Project Details page.

Note

Credentials are unique to your account and your application's package namespace. Avoid reusing credentials across multiple applications.

It is important to use new HERE credentials when switching from an Evaluation plan to a Commercial plan.

Note

You cannot commercially release applications (for example, submit your application to a store) with a license key obtained as part of an Evaluation plan.

Once you have upgraded to a Commercial license, you must do the following:

  1. Obtain your new license key on the Project Details page.
  2. Add this license key to your app.
  3. Re-deploy your app.

To learn how to contact us for more details, see Help.

Add credentials to the application

You can use the LSDAuth class for the SDK authentication.

func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
            LSDAuth.sharedInstance.authorize(licenseKey: "LICENSE_KEY", appId: "APP_ID", appCode: "APP_CODE")
    return true
}

Data is only collected from users who have agreed to share data with HERE.

Use the following method to obtain the end-user's consent for data usage and collection:

LSDHelper.sharedInstance.showConsentAlert(viewController, withCustomMessage: "Your custom message here.") { (selectedAction, error) in
    print(selectedAction, error)
}

This method shows the UIAlertController alert pop-up that requests the end-user allow data collection and sharing with HERE. The consent message presented to the end user refers to a consent withdrawal mechanism, which must be implemented to meet requirements for valid consent. The option to withdraw / change consent preference can be done by calling the showConsentAlert() method and showing the UIAlertController pop-up again.

After this you can start with the basic usage of Live Sense in your app.

results matching ""

    No results matching ""