Skip to content

ultralight-beam/UB.swift

Repository files navigation

UB.swift

Build Status License Maintainability Pod GitHub release (latest SemVer)

UB.swift is the swift implementation of the Ultralight Beam protocol, its primary focus is to provide an SDK for iOS and OSX devices.

Requirements

  • iOS 9 or later
  • OSX 10.13 or later
  • Swift 5.0 or later

Installation

dependencies: [
  .package(url: "https://github.com/ultralight-beam/UB.swift.git", from("0.1.0")),
],
targets: [
  .target(
    name: "Target",
    dependencies: ["UB"]
  ),
]
pod 'UB'

Usage

Using the UB within your own project is kept simple. Initialize a Node, and assign delegate which will then be notified of received messages. Various transports can be added to a Node enabling sending and receiving messages through them.

import UB

let node = Node()
node.delegate = self

node.add(transport: CoreBluetoothTransport())

node.send(...)

License

UB.swift is licensed under the Apache License