HERE iOS SDK Developer's Guide

NMAApplicationContext

Class Summary

class NMAApplicationContext

Derived from: NSObject

.

Include: NMAKit.framework/headers/NMAApplicationContext.h

Inheritance Diagrams

Figure 1. Public inheritance diagram for NMAApplicationContext

[For complete information, see the section Class Details]

Instance Method Summary

Table 1. Instance Methods
Instance Method Summary

-(nonnull) init

Instances of this class should not be initialized

Class Method Summary

Table 2. Class Methods
Class Methods

+(void) disableSdkVersionInCrashStack

Disable showing the HERE SDK Version in crash stack traces.

+(BOOL) isInitialized

Indicates whether the HERE SDK is initialized.

+(BOOL) isNetworkAccessAllowed

Indicates whether the HERE SDK is ALLOWED to access network services.

+(BOOL) isOnline

Indicates whether the HERE SDK is currently online and accessing network services.

+(nullable NSString *) licenseKey

Returns the LicenseKey.

+(nonnull) new

+(nonnull NSString *) sdkVersion

Return the SDK version.

+( NMAApplicationContextError ) setAppId:(nonnull NSString *) appId appCode:(nonnull NSString *) appCode licenseKey:(nonnull NSString *) licenseKey

Sets the mandatory HERE Authentication Credentials and License Key

+( NMAApplicationContextError ) setAppId:(nonnull NSString *) appId appCode:(nonnull NSString *) appCode licenseKey:(nonnull NSString *) licenseKey mapVariant:( NMAMapVariant ) mapVariant

Sets the mandatory HERE Authentication Credentials, License Key and Map Variant

+(void) setNetworkAccessAllowed:(BOOL) networkAccessAllowed

Controls whether the HERE SDK is ALLOWED to access network services.

Class Details

Use this interface to set mandatory authentication crendentials

Note:

YOU MUST SET AUTHENTICATION CREDENTIALS in order to use the APIs contained within this SDK. Some APIs may appear to work without valid credentials but they may stop functioning in the near future when server side configurations change, so please obtain and use valid credentials.

Instance Method Details

-(nonnull) init

Instances of this class should not be initialized. Call class methods only.

Class Method Details

+(void) disableSdkVersionInCrashStack

Disable showing the HERE SDK Version in crash stack traces.

Note:

By default, the HERE SDK starts a lightweight thread which which sleeps in a function whose name is the current HERE SDK Version. Calling this method causes that thread to terminate.

+(BOOL) isInitialized

Indicates whether the HERE SDK is initialized.

Note:

If NO is returned then the HERE SDK is not ready to handle any service.

+(BOOL) isNetworkAccessAllowed

Indicates whether the HERE SDK is ALLOWED to access network services.

Defaults to YES.

Note:

If NO is returned then the HERE SDK will not access the network to download map data, perform searches, calculate routes or when providing any other service unless the service allows overriding this setting, e.g. see NMACoreRouterConnectivity, NMARequestConnectivity, and NMACLE2ConnectivityMode.

+(BOOL) isOnline

Indicates whether the HERE SDK is currently online and accessing network services.

Note:

This reflects the actual online status of the HERE SDK. If isNetworkAccessAllowed returns YES but no data connection is available then this method will return NO. If isNetworkAccessAllowed returns NO then this method returns NO.

+(nullable NSString *) licenseKey

Returns the LicenseKey.

+(nonnull) new

Instances of this class should not be initialized directly

+(nonnull NSString *) sdkVersion

Return the SDK version.

Returns:

The SDK verion

+( NMAApplicationContextError ) setAppId:(nonnull NSString *) appId appCode:(nonnull NSString *) appCode licenseKey:(nonnull NSString *) licenseKey

Sets the mandatory HERE Authentication Credentials and License Key.

These credentials MUST be set before attempting to use any other APIs in the HERE SDK. You may only call one of setAppId:appCode:licenseKey: or setAppId:appCode:licenseKey:mapVariant: methods once. This method will use NMAMapVariantGlobal map variant It is recommended to call this method in [UIApplicationDelegate didFinishLaunchingWithOptions]

Parameters:

  • appId

    Application ID

  • appCode

    Application Code

  • licenseKey

    License Key

Returns:

The status i.e. check NMAApplicationContextError for failure reason

+( NMAApplicationContextError ) setAppId:(nonnull NSString *) appId appCode:(nonnull NSString *) appCode licenseKey:(nonnull NSString *) licenseKey mapVariant:( NMAMapVariant ) mapVariant

Sets the mandatory HERE Authentication Credentials, License Key and Map Variant.

These credentials MUST be set before attempting to use any other APIs in the HERE SDK. You may only call one of setAppId:appCode:licenseKey: or setAppId:appCode:licenseKey:mapVariant: methods once. It is recommended to call this method in [UIApplicationDelegate didFinishLaunchingWithOptions]

Parameters:

  • appId

    Application ID

  • appCode

    Application Code

  • licenseKey

    License Key

  • mapVariant

    map variant to use. See NMAMapVariant.

Returns:

The status i.e. check NMAApplicationContextError for failure reason

+(void) setNetworkAccessAllowed:(BOOL) networkAccessAllowed

Controls whether the HERE SDK is ALLOWED to access network services.

Note:

If set to NO then the HERE SDK will not access the network to download map data, perform searches, calculate routes or when providing any other service unless the service allows overriding this setting, e.g. see NMACoreRouterConnectivity, NMARequestConnectivity, and NMACLE2ConnectivityMode.

You cannot use this account to purchase a commercial plan on Developer Portal, as it is already associated to plans with different payment methods.

To purchase a commercial plan on Developer Portal, please register for or sign in with a different HERE Account.

Something took longer than expected.

The project should be available soon under your projects page.

Sorry, our services are not available in this region.

Something seems to have gone wrong. Please try again later.

We've detected that your account is set to Australian Dollars (AUD).
Unfortunately, we do not offer checkouts in AUD anymore.
You can continue using your current plan as normal, but to subscribe to one of our new plans,
please register for a new HERE account or contact us for billing questions on selfservesupport@here.com.