Inherits from NSObject
Conforms to NSCoding
Declared in ATASesame.h
ATASesame.m

Overview

This is the representation of a Sesame hardware device. The properties directly represent the state of the hardware and the methods directly communicate with the hardware. Although it conforms to NSCoding, it is recommended to let the SDK handle saving for you using the [ATASesameManager saveSesame:] method

Properties

broadcastPower

Allows you to set the broadcast power of the Sesame device to any value from ATABroadcastPower

@property (nonatomic, assign) ATABroadcastPower broadcastPower

Declared In

ATASesame.h

connectionState

The current connection state of the Sesame device. One of ATAConnectionState

@property (nonatomic, assign) ATAConnectionState connectionState

Declared In

ATASesame.h

identifier

The unique identifier of the Sesame unit. If nil it may not have been retreieved yet, Cleared on disconnection

@property (nonatomic, strong, readonly) NSString *identifier

Declared In

ATASesame.h

signalStrength

The current signal strength of the Sesame device (Unknown if not connected)

@property (nonatomic, assign) ATASignalStrength signalStrength

Declared In

ATASesame.h

Instance Methods

activatePairing

This is a no going back method of enabling bluetooth pairing for this Sesame device, this cannot be deactivated and every device that connects to this Sesame in future will have to pair to it.

- (void)activatePairing

Discussion

Warning: Pairing data can be removed with [ATASesameManager disconnectDevice:shouldUnpair:] or by removing the battery

Declared In

ATASesame.h

giveChallengeKey:

Allows you to give the Sesame a challenge key to test against in the future

- (BOOL)giveChallengeKey:(NSData *)key

Parameters

key

The key to set on the Fob. It should be 16 bytes of random data preferably generated with SecRandomCopyBytes or similar

Return Value

YES if successul. NO on failure

Declared In

ATASesame.h

registerConnectionStateHandler:

Allows you to register a block that gets called every time the connection state of the Sesame changes

- (void)registerConnectionStateHandler:(ATAConnectionStateCallback)callback

Parameters

callback

the block to be called. Of type ATAConnectionStateCallback

Declared In

ATASesame.h

registerSignalStrengthHandler:

Allows you to register a block that is called whenever the Signal Strength state changes

- (void)registerSignalStrengthHandler:(ATASignalStrengthCallback)callback

Parameters

callback

the block to be called. Of type ATASignalStrengthCallback

Declared In

ATASesame.h

sendChallenge:withResponse:

Allows you to challenge the Sesame unit to confirm its identity

- (void)sendChallenge:(NSData *)challenge withResponse:(ATAChallengeCallback)callback

Parameters

challenge

The data to challenge with

callback

The block to call when the challenge has been completed. Of type ATAChallengeCallback

Declared In

ATASesame.h