KTKDevicesManager Class Reference

Inherits from NSObject
Declared in KTKDevicesManager.h

Other Properties

  centralState

The current state of the bluetooth central.

@property (nonatomic, assign, readonly) CBManagerState centralState

Discussion

The current state of the bluetooth central.

Declared In

KTKDevicesManager.h

  discovering

A Boolean indicating whether the devices manager is currently discovering.

@property (nonatomic, assign, readonly, getter=isDiscovering) BOOL discovering

Discussion

A Boolean indicating whether the devices manager is currently discovering.

Declared In

KTKDevicesManager.h

  detectingLocks

A Boolean indicating whether the devices manager should detect devices locked status.

@property (nonatomic, assign, readwrite, getter=isDetectingLocks) BOOL detectingLocks

Discussion

A Boolean indicating whether the devices manager should detect devices locked status.

Declared In

KTKDevicesManager.h

  delegate

The delegate object that will receive events.

@property (nonatomic, weak, readonly) id<KTKDevicesManagerDelegate> _Nullable delegate

Discussion

The delegate object that will receive events.

Declared In

KTKDevicesManager.h

Initialization Methods

– initWithDelegate:

Initializes and returns an devices manager object with the specified delegate.

- (instancetype)initWithDelegate:(id<KTKDevicesManagerDelegate> _Nullable)delegate

Parameters

delegate

The delegate object that will receive events.

Return Value

An initialized devices manager object.

Discussion

Initializes and returns an devices manager object with the specified delegate.

Declared In

KTKDevicesManager.h

Configuration Properties

  invalidationAge

A time interval after which nearby device will be invalidated if not re-discovered.

@property (nonatomic, assign, readwrite) NSTimeInterval invalidationAge

Discussion

A time interval after which nearby device will be invalidated if not re-discovered.

Each time nearby device advertising is discovered its updateAt property is updated. If updateAt property is updated for longer than invalidationAge value a nearby device will be invalidated/removed from current devices list.

Default value is 10.0 seconds.

Declared In

KTKDevicesManager.h

  discoveryMode

A mode in which nearby devices discovery is done.

@property (nonatomic, assign, readwrite) KTKDevicesManagerDiscoveryMode discoveryMode

Discussion

A mode in which nearby devices discovery is done.

If discoveryInterval property is set or discovery is started with startDevicesDiscoveryWithInterval: method, discoveryMode is automatically set to KTKDevicesManagerDiscoveryModeInterval.

When discovery is started with startDevicesDiscovery mode will be set to KTKDevicesManagerDiscoveryModeAuto.

Declared In

KTKDevicesManager.h

  discoveryInterval

A time interval after which discovered notifications will be delivered.

@property (nonatomic, assign, readwrite) NSTimeInterval discoveryInterval

Discussion

A time interval after which discovered notifications will be delivered.

Declared In

KTKDevicesManager.h

Discovery Methods

– startDevicesDiscovery

Starts discovery of Kontakt.io’s nearby devices.

- (void)startDevicesDiscovery

Discussion

Starts discovery of Kontakt.io’s nearby devices.

Declared In

KTKDevicesManager.h

– startDevicesDiscoveryWithInterval:

Starts discovery of Kontakt.io’s nearby devices with specified time interval.

- (void)startDevicesDiscoveryWithInterval:(NSTimeInterval)interval

Parameters

interval

A time interval after which discovered notifications will be delivered.

Discussion

Starts discovery of Kontakt.io’s nearby devices with specified time interval.

Declared In

KTKDevicesManager.h

– stopDevicesDiscovery

Stops discovery of Kontakt.io’s nearby devices.

- (void)stopDevicesDiscovery

Discussion

Stops discovery of Kontakt.io’s nearby devices.

Declared In

KTKDevicesManager.h

– restartDeviceDiscoveryWithCompletion:

Restarts discovery of Kontakt.io’s nearby devices.

- (void)restartDeviceDiscoveryWithCompletion:(void ( ^ ) ( NSError *_Nullable ))completion

Parameters

completion

A block object to be executed when manager restarts the discovery.

Discussion

Restarts discovery of Kontakt.io’s nearby devices.

Declared In

KTKDevicesManager.h