Skip to content

JASS-2021/Swift-NIO-LIFX

 
 

Repository files navigation

Build and Test codecov

💡 SwiftNIO LIFX

Implementation of the LIFX LAN protocol in Swift based on Swift NIO. You can find a reference of the LIFX LAN PROTOCOL on lan.developer.lifx.com.

Example

The repository contains a small example command-line tool that can be used to discover all devices on a network and toggle them on and off.

Building

SwiftNIO LIFX is build using Swift and uses Swift Packages. You can learn more about the Swift Package Manager at swift.org.

macOS & Xcode

If you use macOS, you can use Xcode to open the Package.swift file at the root of the repository using Xcode. You can learn more on how to use Swift Packages with Xcode on developer.apple.com.

Swift Command Line Tool

On plattforms that support the Swift Package Manager you can use the swift build, swift run, and swift tests commands to build, run and test the source code.

Visual Studio Code on any operating system

⚠️ Be aware that UDP broadcast currently doesn't work in the Docker containers. If you want to test the device discovery, you need to run a docker container using the host network or directly run the code on the target platform.

If you are not using macOS or don't want to use Xcode, you can use Visual Studio Code using the Remote Containers plugin. You must install the latest version of Visual Studio Code, the latest version of the Remote Containers plugin and Docker.

  1. Open the folder using Visual Studio Code
  2. If you have installed the Remote Containers plugin Visual Studio Code automatically asks you to reopen the folder to develop in a container at the bottom right of the Visual Studio Code window.
  3. Press "Reopen in Container" and wait until the docker container is build
  4. You can now build the code using the build keyboard shortcut and run and test the code within the docker container using the Run and Debug area.

Packages

No packages published

Languages

  • Swift 99.9%
  • Dockerfile 0.1%