The local toolchain really is much better, especially when it took minutes to flash each time.
I was thinking to simplify implementation, just remove the initial checking for connectivity with a define if possible? Then Spark.connect() could be called with a condidtion.
Or update the firmware to have limited retries to the cloud on 1st run?
If the reconnect is kept blocking that should be ok as it will ensure that the spark is always connected to wifi if required. If no wifi is required wifi can just be undefined.
Just hoping for a quick fix temporarily!