Open crenwick opened 8 years ago
I agree. No problems to keep the discussion here.
There's certainly room for improvement on the .connected
API - setup should listen to the specific device came online
and device went offline
events that Photons publish to the cloud. I've been planning on adding that functionality internally to the Cloud SDK at some point.
This block checks to see if the new device is connected to the ios Spark SDK, however, it uses
device.connected
from the API.As @zsup mentioned in https://github.com/spark/spark-setup-ios/issues/28#issuecomment-151688414, there is an issue with this API being accurate. In my unscientific testing, it seems to be a 50/50 shot when the device is actually connected and the
device.connected
flag being true.This not only presents a false error screen to customers, but also returns the
didFinishWithResult
as.Failure
.This recent PR brought in that check: https://github.com/spark/spark-setup-ios/commit/4178ef4219bb6479cbcdc3c862b2aa9251a1a9a3
I want to open an issue here because I'm not sure if this iOS setup library should be relying on a unstable API, but I'd also like to track and contribute to the API issue. Is there a place where that discussion is currently taking place? What repo might that exist on?