Inherits from NSObject
Declared in Netmera.h
Netmera.m

Overview

Netmera class is the base class for Netmera SDK. You can configure how Netmera should behave using this class. Also, you can get InstallationId of your application using [Netmera getInstallationId] class method.

Tasks

  • + apiKey

    Returns application-specific key received from Netmera and set in the application.

  • + setApiKey:

    Sets the application-specific key received from Netmera for the application requests.

  • + getInstallationId

    Returns a unique string that could be used to identify the device for the application.

  • + setGlobalRequestTimeout:

    Sets a timeout value for all sending requests from Netmera SDK throughout the application. The default value is 60 seconds.

  • + pushInboxEnabled

    Returns the boolean value that determines whether the push inbox is enabled or not. The default value is YES.

  • + setPushInboxEnabled:

    Sets the boolean value that determines whether the push inbox controller is available for your application or not when a rich push message is received. The default value is YES.

  • + pushInboxBadgeUpdateEnabled

    Returns the boolean value that determines whether Netmera should manage application badge number depending on number of unread pushes in push inbox. The default value is YES.

  • + setPushInboxBadgeUpdateEnabled:

    Sets the boolean value that determines whether Netmera should manage application badge number depending on number of unread pushes in push inbox. The default value is YES.

  • + richPushShouldBeShownImmediately

    Returns the boolean value for receiving rich pushes to be displayed immediately or be asked whether rich pushes are displayed or not with an alert box. The default value is YES.

  • + setRichPushShouldBeShownImmediately:

    Sets the boolean value for receiving rich pushes to be displayed immediately or not. If shouldBeShown value is YES, receiving rich push is displayed on the screen directly without any alert. If it is NO, then an alert box, which waits a confirmation about if rich push should be shown or not from the user is shown on the screen. The default value is YES.

  • + richPushShouldShowProgressHUD

    Returns the boolean value which indicates whether a loading indicator is displayed or not when showing rich push notifications. The default value is YES.

  • + setRichPushShouldShowProgressHUD:

    Sets the boolean value whether a progress HUD should be displayed or not while setting up a receiving rich push notification. The default value is YES.

  • + exceptionReportingEnabled

    Returns the boolean value which indicates whether throwing exceptions should be reported or not. The default value is YES.

  • + setExceptionReportingEnabled:

    Sets the boolean value that shows whether exceptionReporting should be enabled or disabled. Default value is YES.

  • + significantLocationChangeTrackingEnabled

    Returns the boolean value which indicates whether locationTracking is enabled or disabled. Default value is YES.

  • + setSignificantLocationChangeTrackingEnabled:

    Sets the boolean value that shows whether locationTracking should be enabled or disabled. Default value is YES.

Class Methods

apiKey

Returns application-specific key received from Netmera and set in the application.

+ (NSString *)apiKey

Return Value

The string value which refers to api key.

Discussion

Returns application-specific key received from Netmera and set in the application.

Declared In

Netmera.h

exceptionReportingEnabled

Returns the boolean value which indicates whether throwing exceptions should be reported or not. The default value is YES.

+ (BOOL)exceptionReportingEnabled

Return Value

The boolean value that enables or disables sending exception reports to Netmera throughout the application.

Discussion

Returns the boolean value which indicates whether throwing exceptions should be reported or not. The default value is YES.

Declared In

Netmera.h

getInstallationId

Returns a unique string that could be used to identify the device for the application.

+ (NSString *)getInstallationId

Return Value

The string value generating exclusively for the application.

Discussion

Returns a unique string that could be used to identify the device for the application.

Declared In

Netmera.h

pushInboxBadgeUpdateEnabled

Returns the boolean value that determines whether Netmera should manage application badge number depending on number of unread pushes in push inbox. The default value is YES.

+ (BOOL)pushInboxBadgeUpdateEnabled

Return Value

The enabled or disabled boolean value.

Discussion

Returns the boolean value that determines whether Netmera should manage application badge number depending on number of unread pushes in push inbox. The default value is YES.

Declared In

Netmera.h

pushInboxEnabled

Returns the boolean value that determines whether the push inbox is enabled or not. The default value is YES.

+ (BOOL)pushInboxEnabled

Return Value

The enabled or disabled boolean value.

Discussion

Returns the boolean value that determines whether the push inbox is enabled or not. The default value is YES.

Declared In

Netmera.h

richPushShouldBeShownImmediately

Returns the boolean value for receiving rich pushes to be displayed immediately or be asked whether rich pushes are displayed or not with an alert box. The default value is YES.

+ (BOOL)richPushShouldBeShownImmediately

Return Value

The boolean value that shows whether the rich push is shown immediately or not.

Discussion

Returns the boolean value for receiving rich pushes to be displayed immediately or be asked whether rich pushes are displayed or not with an alert box. The default value is YES.

Declared In

Netmera.h

richPushShouldShowProgressHUD

Returns the boolean value which indicates whether a loading indicator is displayed or not when showing rich push notifications. The default value is YES.

+ (BOOL)richPushShouldShowProgressHUD

Return Value

The boolean value showing that a progress HUD should be displayed or not.

Discussion

Returns the boolean value which indicates whether a loading indicator is displayed or not when showing rich push notifications. The default value is YES.

Declared In

Netmera.h

setApiKey:

Sets the application-specific key received from Netmera for the application requests.

+ (void)setApiKey:(NSString *)key

Parameters

key

The unique value received from “Overview” section of your application in Netmera website.

Discussion

Sets the application-specific key received from Netmera for the application requests.

This value is unique for every application, therefore Netmera determines which app sends whichever requests. This is the required value that must be set for every application before making any interaction with Netmera.

You can set the api key by either calling this method with the relevant parameter or adding manually it into NetmeraSettings.plist.

Declared In

Netmera.h

setExceptionReportingEnabled:

Sets the boolean value that shows whether exceptionReporting should be enabled or disabled. Default value is YES.

+ (void)setExceptionReportingEnabled:(BOOL)enabled

Parameters

enabled

The boolean value that enables exceptionReporting or not.

Discussion

Sets the boolean value that shows whether exceptionReporting should be enabled or disabled. Default value is YES.

If you enable exceptionReporting, the exceptions that are handled by you or crashes your application are catched by Netmera SDK and send their reports to Netmera automatically. Then you can see your detailed reports in Netmera website.

You can send your custom exception reports to Netmera, too. Just call sendExceptionReport: method of NMExceptionReporter class. This method sends the report for the exception given as parameter independent from the value of this flag.

Declared In

Netmera.h

setGlobalRequestTimeout:

Sets a timeout value for all sending requests from Netmera SDK throughout the application. The default value is 60 seconds.

+ (void)setGlobalRequestTimeout:(NSTimeInterval)seconds

Parameters

seconds

Value used as the timeout interval for requests.

Discussion

Sets a timeout value for all sending requests from Netmera SDK throughout the application. The default value is 60 seconds.

You should not set a short timeout interval, because this may prevents Netmera SDK to send requests in weak internet connections.

Declared In

Netmera.h

setPushInboxBadgeUpdateEnabled:

Sets the boolean value that determines whether Netmera should manage application badge number depending on number of unread pushes in push inbox. The default value is YES.

+ (void)setPushInboxBadgeUpdateEnabled:(BOOL)enabled

Parameters

enabled

The boolean value that enables push inbox or not.

Discussion

Sets the boolean value that determines whether Netmera should manage application badge number depending on number of unread pushes in push inbox. The default value is YES.

Declared In

Netmera.h

setPushInboxEnabled:

Sets the boolean value that determines whether the push inbox controller is available for your application or not when a rich push message is received. The default value is YES.

+ (void)setPushInboxEnabled:(BOOL)enabled

Parameters

enabled

The boolean value that enables push inbox or not.

Discussion

Sets the boolean value that determines whether the push inbox controller is available for your application or not when a rich push message is received. The default value is YES.

Declared In

Netmera.h

setRichPushShouldBeShownImmediately:

Sets the boolean value for receiving rich pushes to be displayed immediately or not. If shouldBeShown value is YES, receiving rich push is displayed on the screen directly without any alert. If it is NO, then an alert box, which waits a confirmation about if rich push should be shown or not from the user is shown on the screen. The default value is YES.

+ (void)setRichPushShouldBeShownImmediately:(BOOL)shouldBeShown

Parameters

shouldBeShown

The boolean value that controls the display of the rich pushes.

Discussion

Sets the boolean value for receiving rich pushes to be displayed immediately or not. If shouldBeShown value is YES, receiving rich push is displayed on the screen directly without any alert. If it is NO, then an alert box, which waits a confirmation about if rich push should be shown or not from the user is shown on the screen. The default value is YES.

Declared In

Netmera.h

setRichPushShouldShowProgressHUD:

Sets the boolean value whether a progress HUD should be displayed or not while setting up a receiving rich push notification. The default value is YES.

+ (void)setRichPushShouldShowProgressHUD:(BOOL)shouldShow

Parameters

shouldShow

The boolean value that activates or deactivates a loading indicator.

Discussion

Sets the boolean value whether a progress HUD should be displayed or not while setting up a receiving rich push notification. The default value is YES.

Declared In

Netmera.h

setSignificantLocationChangeTrackingEnabled:

Sets the boolean value that shows whether locationTracking should be enabled or disabled. Default value is YES.

+ (void)setSignificantLocationChangeTrackingEnabled:(BOOL)enabled

Parameters

enabled

The boolean value that enables locationTracking or not.

Discussion

Sets the boolean value that shows whether locationTracking should be enabled or disabled. Default value is YES.

Users' locations are tracked by default (using startMonitoringSignificantLocationChanges method of CLLocationManager class). If you want to disable tracking user’s location, you should call [NetmeraClient setLocationTrackingEnabled:NO] in application:didFinishLaunchingWithOptions: method in your app delegate.

This flag does NOT affect operation of Geofence Service. You can start or stop a geofence service regardless of this flag.

Declared In

Netmera.h

significantLocationChangeTrackingEnabled

Returns the boolean value which indicates whether locationTracking is enabled or disabled. Default value is YES.

+ (BOOL)significantLocationChangeTrackingEnabled

Return Value

The boolean value that enables or disables locationTracking.

Discussion

Returns the boolean value which indicates whether locationTracking is enabled or disabled. Default value is YES.

Users' locations are tracked by default (using startMonitoringSignificantLocationChanges method of CLLocationManager class). If you want to disable tracking user’s location, you should call [NetmeraClient setLocationTrackingEnabled:NO] in application:didFinishLaunchingWithOptions: method in your app delegate.

This flag does NOT affect operation of Geofence Service. You can start or stop a geofence service regardless of this flag.

Declared In

Netmera.h