DFRobot / BlunoBasicDemo

The basic demo for bluno
GNU General Public License v3.0
166 stars 233 forks source link

Make the library compatible with swift and run BT in the background #7

Open pec1985 opened 8 years ago

pec1985 commented 8 years ago

To make the library compatible with Swift, I had to change the name of this method, -(void)didReceiveData:(NSData*)data Device:(DFBlunoDevice*)dev; to -(void)didReceiveData:(NSData*)data device:(DFBlunoDevice*)dev; (Notice the lowercase D in device) I also added a queue for the Bluetooth Networking, and added a property to make the callbacks happen on the main thread or background thread. For my personal use case, I need everything on a background thread.