Skip to content

Instantly share code, notes, and snippets.

View jmfdz's full-sized avatar

Jose Maria Fernandez jmfdz

View GitHub Profile
@nbhasin2
nbhasin2 / Ble.swift
Last active November 27, 2016 09:49
Bluetooth Discovery / Connection
More links -
http://clover-lemongrass.cloudvent.net/blog/2015/06/11/zero-to-ble-on-ios-part-one/
http://clover-lemongrass.cloudvent.net/blog/2015/10/15/developing-ios-app-using-ble-standard/
Here is the complete code to discover peripheral, connect to it and discover its services and characteristics.
1.Connect peripheral
func centralManager(central: CBCentralManager, didDiscoverPeripheral peripheral: CBPeripheral, advertisementData: [String : AnyObject], RSSI: NSNumber) {