Turning round and round
Covered off a few things today - I discovered that the 'quiet areas' were only working when the app was running, or displayed in CarPlay. Of course, this is how I'm driving the car at the moment - as I test as much as possible. But in real life we're not going to have the 992noise app running all the time .. but we still expect it to switch the valves on and off as you enter and exit a quiet zone. So I've updated the code to request and use background permissions to be notified even if running. This triggered a bit more work than I'd expected because, of course, when an app is in the background it doesn't tend to retain its bluetooth connection. So there was a bit more work to do when Apple tells me that we've entered a quiet zone - we have to make sure we get reconnected first .. and that process can take some time ; you don't wait for a connection, you tell Apple what to do when you eventually connect. This code needed to be written and configured ...