What is sample code to turn outlet on/off via Homekit SDK in Swift for IOS phone app?
Outlet name is SYLVANIA Outlet-4515, room is Bedroom, home is Holmdel.
What is sample code to turn outlet on/off via Homekit SDK in Swift for IOS phone app?
Outlet name is SYLVANIA Outlet-4515, room is Bedroom, home is Holmdel.
Copyright © 2021 Jogjafile Inc.
solved...
var accessories: [HMAccessory] = [] var home: HMHome?
var toggleState: Bool = false var indexPathRow = 0
// For discovering new accessories let browser = HMAccessoryBrowser() var discoveredAccessories: [HMAccessory] = []
@IBAction func onoff(_ sender: Any) {