{"action":"created","issue":{"url":"https://api.github.com/repos/spark/spark-setup-ios/issues/37","repository_url":"https://api.github.com/repos/spark/spark-setup-ios","labels_url":"https://api.github.com/repos/spark/spark-setup-ios/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/spark/spark-setup-ios/issues/37/comments","events_url":"https://api.github.com/repos/spark/spark-setup-ios/issues/37/events","html_url":"https://github.com/spark/spark-setup-ios/issues/37","id":119574106,"number":37,"title":"Setup causing false negatives.","user":{"login":"crenwick","id":5790634,"avatar_url":"https://avatars.githubusercontent.com/u/5790634?v=3","gravatar_id":"","url":"https://api.github.com/users/crenwick","html_url":"https://github.com/crenwick","followers_url":"https://api.github.com/users/crenwick/followers","following_url":"https://api.github.com/users/crenwick/following{/other_user}","gists_url":"https://api.github.com/users/crenwick/gists{/gist_id}","starred_url":"https://api.github.com/users/crenwick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crenwick/subscriptions","organizations_url":"https://api.github.com/users/crenwick/orgs","repos_url":"https://api.github.com/users/crenwick/repos","events_url":"https://api.github.com/users/crenwick/events{/privacy}","received_events_url":"https://api.github.com/users/crenwick/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-30T20:26:43Z","updated_at":"2016-03-08T23:10:31Z","closed_at":null,"body":"[This block](https://github.com/spark/spark-setup-ios/blob/master/Classes/UI/SparkConnectingProgressViewController.m#L445-L448) checks to see if the new device is connected to the ios Spark SDK, however, it uses `device.connected` from the API.\r\n\r\nAs @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.\r\n\r\nThis not only presents a false error screen to customers, but also returns the `didFinishWithResult` as `.Failure`.\r\n\r\nThis recent PR brought in that check: https://github.com/spark/spark-setup-ios/commit/4178ef4219bb6479cbcdc3c862b2aa9251a1a9a3\r\n\r\nI 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?"},"comment":{"url":"https://api.github.com/repos/spark/spark-setup-ios/issues/comments/194011514","html_url":"https://github.com/spark/spark-setup-ios/issues/37#issuecomment-194011514","issue_url":"https://api.github.com/repos/spark/spark-setup-ios/issues/37","id":194011514,"user":{"login":"idokleinman","id":6490062,"avatar_url":"https://avatars.githubusercontent.com/u/6490062?v=3","gravatar_id":"","url":"https://api.github.com/users/idokleinman","html_url":"https://github.com/idokleinman","followers_url":"https://api.github.com/users/idokleinman/followers","following_url":"https://api.github.com/users/idokleinman/following{/other_user}","gists_url":"https://api.github.com/users/idokleinman/gists{/gist_id}","starred_url":"https://api.github.com/users/idokleinman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/idokleinman/subscriptions","organizations_url":"https://api.github.com/users/idokleinman/orgs","repos_url":"https://api.github.com/users/idokleinman/repos","events_url":"https://api.github.com/users/idokleinman/events{/privacy}","received_events_url":"https://api.github.com/users/idokleinman/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T23:10:31Z","updated_at":"2016-03-08T23:10:31Z","body":"I agree. No problems to keep the discussion here.\r\nThere'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.\r\n"}}