Insiteo Class Reference

Inherits from NSObject
Declared in Insiteo.h

Overview

The Insiteo class contains static functions to interact with the Insiteo framework.

Initialization

+ initializeWithAPIKey:modules:error:

Initializes the Insiteo SDK with your client API key.

+ (BOOL)initializeWithAPIKey:(NSString *)APIKey modules:(NSArray *)modules error:(NSError **)error

Parameters

APIKey

Your Insiteo client API key (available in ‘My Profile’ in your Insiteo web interface).

modules

Insiteo modules to work with.

error

Pointer to a NSError that will be set if an error occured during initialization process.

Return Value

YES if the SDK has been initialized with a valid API key, otherwise NO.

Discussion

The modules parameter is a NSArray of modules class. If you only want to use location services and no other features, just pass an empty array or nil. Otherwise, you will call the init method like (analytics module): [Insiteo initializeWithAPIKey:@“YOUR-API-KEY” modules:@[ [INSAnalytics class] ] error:&error];

Declared In

Insiteo.h

Synchronization

+ synchronize:

Performs remote synchronization to retrieve your client configuration.

+ (void)synchronize:(InsiteoSuccessHandler)successHandler

Parameters

successHandler

A block which provides a boolean if the synchronization succeed, otherwise an NSError which describes the problem.

Discussion

The SDK should be properly initialized.

Declared In

Insiteo.h

+ lastSynchronizationDate

Returns the last SDK synchronization date.

+ (NSDate *)lastSynchronizationDate

Return Value

The last synchronization date if the SDK has already been synchronized, otherwise nil.

See Also

Declared In

Insiteo.h

Start / Stop

+ isStarted

Boolean used to know if the SDK is started.

+ (BOOL)isStarted

Return Value

YES if the SDK is started, otherwise NO.

Declared In

Insiteo.h

+ start:

Starts Insiteo SDK modules according to your client configuration.

+ (BOOL)start:(NSError **)error

Parameters

error

Pointer to a NSError that will be set if an error occured during the start process.

Discussion

Insiteo SDK should be initialized AND synchronized.

Declared In

Insiteo.h

+ stop

Stops Insiteo SDK modules.

+ (void)stop

Discussion

If you need background support, do not stop the SDK on application killed. Geofences and beacons will not be monitored anymore and no action will be triggered until you call the +start: method again.

Declared In

Insiteo.h

+ resetSDK

Resets Insiteo SDK.

+ (BOOL)resetSDK

Discussion

This method will stop all modules (see stop) and will reset all SDK databases. After reseting the SDK you must call synchronize: and start: methods again.

Declared In

Insiteo.h

SDK Logging

+ getSDKLogLevel

Returns the current log level.

+ (INSLogLevel)getSDKLogLevel

Return Value

The current log level.

Declared In

Insiteo.h

+ setSDKLogLevel:

Sets a new log level.

+ (void)setSDKLogLevel:(INSLogLevel)logLevel

Parameters

logLevel

The new log level.

Declared In

Insiteo.h

Core Location Events

+ registerLocationEventsDelegate:

Registers a delegate to core location events (iBeacon, geofencing, etc.).

+ (void)registerLocationEventsDelegate:(id<INSCoreLocationDelegate>)delegate

Parameters

delegate

The delegate receiver that is sent messages when location events occured.

Declared In

Insiteo.h