I've been fighting the following swift code. It's called in the background, and didn't do anything (notifications registered elsewhere are never called). However, if I run it on the main thread, it works fine.
This should work on a background thread too, no?
let hueSdk = PHHueSDK() hueSdk.enableLogging(true) hueSdk.startUpSDK() NSLog("Server: Attempting to link with Hue hub at \(request.ipAddress) with MAC \(request.macAddress)") hueSdk.setBridgeToUseWithIpAddress(request.ipAddress, macAddress: request.macAddress) hueSdk.startPushlinkAuthentication()
I've been fighting the following swift code. It's called in the background, and didn't do anything (notifications registered elsewhere are never called). However, if I run it on the main thread, it works fine.
This should work on a background thread too, no?
let hueSdk = PHHueSDK() hueSdk.enableLogging(true) hueSdk.startUpSDK() NSLog("Server: Attempting to link with Hue hub at \(request.ipAddress) with MAC \(request.macAddress)") hueSdk.setBridgeToUseWithIpAddress(request.ipAddress, macAddress: request.macAddress) hueSdk.startPushlinkAuthentication()