Inherits from NSObject
Declared in ATASesameManager.h
ATASesameManager.m

Overview

The Sesame Manager is the main class of the Sesame SDK. It allows you to discover and connect to Sesame devices. It also handles the saving of Sesame devices for later use.

Class Methods

sharedInstance

Main initialization / access to the Sesame SDK

+ (instancetype)sharedInstance

Return Value

a valid instance of the Sesame Manager class

Discussion

Warning: You should only use this initializer

Declared In

ATASesameManager.h

Instance Methods

bluetoothOff

Check whether bluetooth is turned off

- (BOOL)bluetoothOff

Return Value

YES if bluetooth is turned off

Declared In

ATASesameManager.h

connectDevice:withAutoReconnect:

Connects to a Sesame device so you can interact with it. You can also choose to “link” the Sesame to auto reconnect to it

- (void)connectDevice:(ATASesame *)sesame withAutoReconnect:(BOOL)autoReconnect

Parameters

sesame

The ATASesame to connect to

autoReconnect

whether to auto reconnect or not

Declared In

ATASesameManager.h

disconnectDevice:shouldUnpair:

Disconnect from a Sesame fob, optionally force it to remove its pairing data before disconnecting

- (void)disconnectDevice:(ATASesame *)sesame shouldUnpair:(BOOL)shouldUnpair

Parameters

sesame

The ATASesame to disconnect from

shouldUnpair

Forces the Sesame to remove its pairing data

Declared In

ATASesameManager.h

saveSesame:

This “bonds” a Sesame, allowing it to be retrived at any point in the future using savedSesame, this will persist accross app launches

- (void)saveSesame:(ATASesame *)sesame

Parameters

sesame

The ATASesame to “bond” with, if nil then the previous bond is broken

Declared In

ATASesameManager.h

savedSesame

Allows you to retrieve the bonded Sesame device. This will load the ATASesame from disk if required. If nil, then no Sesame has been set up

- (ATASesame *)savedSesame

Return Value

the bonded ATASesame or nil if none have been set up

Declared In

ATASesameManager.h

scanForSesameWithTimeout:andCallback:

Allows you to scan for Sesame devices for a given period of time

- (BOOL)scanForSesameWithTimeout:(NSInteger)timeout andCallback:(ATASesameScanningCallback)callback

Parameters

timeout

Time to scan (in seconds)

callback

The block to call after scanning has finished. Of type ATASesameScanningCallback

Return Value

YES if the scan started successfully, NO means the scan couldn’t be started, normally due to Bluetooth being off.

Declared In

ATASesameManager.h