Hi, i've developing bluetooth off/on application for my IOT Device. When IoT publish "off" message, mac's bt should be close. Or the exact opposite.
To make it, i decided to use "blueutil". So here is my function:
let task = Process()
task.launchPath = "/opt/homebrew/Cellar/blueutil/2.9.1/bin/blueutil"
task.arguments = ["power", "0"]
task.launch()
task.waitUntilExit()
}
launchPath is blueutil's installed colation. But here is the problem. If i call the function, i get this error:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'launch path not accessible' terminating with uncaught exception of type NSException
How can i fix it? Is there any way to close or open bluetooth? Thanks a lot from now.