We released our iOS app at version 1.0, and we knew there was a very annoying trait to it. iOS only allows apps to work in the background in certain ways, and while BLE is one of those ways, it would still suspend our app in between BLE events. When our app is suspended, the TCP socket to the Particle cloud is closed. This essentially means that bluz will connect, and stay connected, just fine while the bluz app is held open in the foreground. However, the moment you switch apps, go to the home screen, or just lock your phone, the Particle cloud connection would timeout soon thereafter and bluz would no longer be connected. So if you have connected bluz on an iPhone, and then tried to switch to the Particle app to use Tinker, for example, and noticed your bluz stopped working by the time you got there, this is the trait you experienced.
Well, no more!
We are happy to say that v1.1 of the iOS app is in the app store, freshly approved through the process (after 9 excruciating days) just now. This does away with the previous annoying trait by asking for background modes after each BLE event. That means our app always gets extended in background mode until the next BLE event, meaning the socket never gets closed, and bluz should now stay connected indefinitely no matter what you do! (Well, ok, don’t shut off the iPhone or turn Bluetooth off, that would stop it from working )
So, why didn’t we release this feature in v1.0? Well, we were a bit concerned it wouldn’t go through the approval process. While what we are not doing isn’t illegal or anything, or even against the Apple policies, it also isn’t explicitly allowed. There are gray areas in their approval process, and this seemed to fall into that bucket. So we released v1.0 so people would have something when bluz arrived, making sure to quickly follow it up with this fix.
So please, if you have been using the iOS app and were frustrated by this behavior, you will not have to worry anymore! Enjoy v1.1
Also, there is now an option to do automatic reconnects, meaning the app will automatically reconnect to your previously connected bluz boards if they disconnect for any reason. This is a bit experimental still, but seems to work so far through our testing.