Inherits from NSObject
Declared in SBManager.h

Overview

SBManager

The SBManager provides a centralized way of easily using the Sensorberg SDK. Every app must have exactly one instance, created by the :sharedManager, usually on app launch.

Tasks

Class Methods

sharedManager

sharedManager

+ (instancetype)sharedManager

Return Value

The SBManager singleton instance

Availability

2.0

Declared In

SBManager.h

Instance Methods

availabilityStatus

availabilityStatus

- (SBManagerAvailabilityStatus)availabilityStatus

Return Value

General availability of the system

Availability

2.0

Declared In

SBManager.h

backgroundAppRefreshStatus

- (SBManagerBackgroundAppRefreshStatus)backgroundAppRefreshStatus
Discussion

backgroundAppRefreshStatus

Availability

2.0

Declared In

SBManager.h

bluetoothAuthorization

- (SBBluetoothStatus)bluetoothAuthorization
Discussion

bluetoothAuthorization

Return Value

Availability

2.0

Declared In

SBManager.h

canReceiveNotifications

Checks and returns a boolean value depending on the types of notifications that can be shown

- (BOOL)canReceiveNotifications

Return Value

true if at least one type of notification can be shown, false if no type of notifications are allowed

Availability

2.0

Declared In

SBManager.h

init

- (instancetype)init

locationAuthorization

- (SBLocationAuthorizationStatus)locationAuthorization
Discussion

locationAuthorization

Availability

2.0

Declared In

SBManager.h

new

- (instancetype)new

reportConversion:forCampaignAction:

- (void)reportConversion:(SBConversionType)type forCampaignAction:(NSString *)action
Discussion

Track campaign conversion

Parameters

type

An SBConversionType value (one of kSBConversionSuccessful, kSBConversionIgnored or kSBConversionUnavailable

action

The action identifier

Declared In

SBManager.h

requestBluetoothAuthorization

- (void)requestBluetoothAuthorization
Discussion

requestBluetoothAuthorization

Request authorization to use Bluetooth services
Warning Required if you’re using the advanced functionalities of the SDK

Availability

2.0

Declared In

SBManager.h

requestLocationAuthorization

Request user access to location information

Ideally, you would show a message to the user explaining why access to Location services is required.
Warning Be sure to include the NSLocationAlwaysUsageDescription key in the Info.plist with a descriptive string (Deprecated: 2.1 Use requestLocationAuthorization: instead)

- (void)requestLocationAuthorization

Availability

2.0

Declared In

SBManager.h

requestLocationAuthorization:

Request user access to location information (optionally always)

Ideally, you would show a message to the user explaining why access to Location services is required.
Warning Be sure to include the NSLocationAlwaysUsageDescription and/or NSLocationWhenInUseUsageDescription key in the Info.plist with a descriptive text

- (void)requestLocationAuthorization:(BOOL)always

Availability

2.1

Declared In

SBManager.h

requestNotificationsAuthorization

Request authorization to show notifications

- (void)requestNotificationsAuthorization

Availability

2.0

Declared In

SBManager.h

requestResolverStatus

- (void)requestResolverStatus
Discussion

requestResolverStatus

Ping the resolver to check latency (and connectivity); Subscribe to SBEventPing or call resolverLatency: to check status

Availability

2.0

Declared In

SBManager.h

resetSharedClient

Force a reset of the SBManager (clears cache, Resolver URL, API Key). To use the SBManager again, call [SBManager sharedManager] and setup the environment with :setApiKey:delegate

- (void)resetSharedClient

Availability

2.0

Declared In

SBManager.h

resolverLatency

resolverLatency

- (double)resolverLatency

Return Value

Latency in seconds of the resolver; a negative value means no connection to the resolver

Availability

2.0

Declared In

SBManager.h

resolverURL

resolverURL (Deprecated: 2.3)

- (NSString *)resolverURL

Return Value

The Resolver URL string.

Availability

2.0

Declared In

SBManager.h

setApiKey:delegate:

Setup method for the SBManager

- (void)setApiKey:(NSString *)apiKey delegate:(id)delegate

Parameters

apiKey

The API key string - register on the management platform to obtain an API key

delegate

The class instance that will receive the SBManager events

Availability

2.0

Declared In

SBManager.h

setIDFAValue:

- (void)setIDFAValue:(NSString *)IDFA
Discussion

Attach the Apple Advertising Identifier to this instance of the SDK.

Parameters

IDFA

A NSString containing the UUID of the Apple Advertising Identifier

Availability

2.1

Declared In

SBManager.h

setTargetAttributes:

- (void)setTargetAttributes:(NSDictionary *)attributes
Discussion

Set target attributes

The attributes are passed to the back-end as url-encoded params

Parameters

attributes

A Dictionary containing key-value pair of tartget informations; pass nil (or empty value) to clear the attributes

Availability

2.3.1

Declared In

SBManager.h

startMonitoring

- (void)startMonitoring
Discussion

Start monitoring for all campaign UUID’s

Availability

2.0

Declared In

SBManager.h

startMonitoring:

- (void)startMonitoring:(NSArray *)UUIDS
Discussion

Start monitoring for specific UUID’s

Parameters

UUIDS

An array of UUID’s as NSString’s

Declared In

SBManager.h

stopMonitoring

- (void)stopMonitoring
Discussion

stopMonitoring

Stops monitoring for all UUID’s

Availability

2.0

Declared In

SBManager.h