Closed sodastsai closed 9 years ago
Test app is broken. Closing. If you allow me 'push' to the spheroconn project, I'll push the fix.
Pushed the update. The primary issue was the assignment of a local var in line 23 of ViewController with the 'let' keyword. I would recommend that you name SpheroDevice to SpheroFinder or SpheroConnectionManager and make it a long-lived object that has the responsibility of managing the connection state of robots. By SpheroDevice being short-lived, your notification listener was being reconnected the 2nd time you attempted to connect, hence the reason your sample worked every other time.
Hi,
I have a test project sodastsai/spheroconn here. This test project has an issue about Sphero connectivity.
In this app, there's a button for users to connect/disconnect Sphero.
Even the 4th time, 5th time, and further times, the Sphero ball is connectable at N times, and has no response at N+1 times.
weird.
Following are my NSLog output of this app (with some comments):