Skip to content

CLASS

OscletonSDK

public class OscletonSDK: NSObject

The main entry point to use Oscleton SDK.

This singleton provides multiple features splitted in different classes: - OSConfiguration is responsible for the settings needed to establish the connection. - OSController lets you control a Live set from your iOS device. - OSReceiver lets you receive Live set events in real time on your iOS device.

  • Since: 0.1

Properties

config

public private(set) var config: OSConfiguration

OSConfiguration is responsible for the settings needed to establish the connection.

controller

public private(set) var controller: OSController

OSController lets you control a Live set from your iOS device.

receiver

public private(set) var receiver: OSReceiver

OSReceiver lets you receive Live set events in real time on your iOS device.

Methods

initialize()

public func initialize()

Initialize the SDK.

This method must be called at application launch, in the app delegate's application:didFinishLaunchingWithOptions: method.

  • Since: 0.1

connect()

public func connect()

Connect the device and prepare to listen for incoming changes.

If applicationDidBecomeActive: is called in the app delegate, this method will be automatically called when the app goes to foreground.

  • Since: 0.1

disconnect()

public func disconnect()

Disconnect the device and close the incoming changes listener.

If applicationWillResignActive: is called in the app delegate, this method will be automatically called when the app goes to background.

  • Since: 0.1

startListening()

public func startListening()

Start listening for incoming changes.

If applicationDidBecomeActive: is called in the app delegate, this method will be automatically called when the app goes to foreground.

  • Since: 0.1

stopListening()

public func stopListening()

Stop listening for incoming changes.

If applicationWillResignActive: is called in the app delegate, this method will be automatically called when the app goes to background.

  • Since: 0.1

applicationDidBecomeActive()

public func applicationDidBecomeActive()

Call this function in the app delegate's applicationDidBecomeActive: to automatically handle device connection state.

Internally, it directly calls connect: and startListening: methods.

  • Since: 0.1

applicationWillResignActive()

public func applicationWillResignActive()

Call this function in the app delegate's applicationWillResignActive: to automatically handle device connection state.

Internally, it directly calls disconnect and stopListening methods.

  • Since: 0.1