Simple, block-based, lightweight library over CoreBluetooth
LGBluetooth
What is LGBluetooth?
LGBluetooth is a simple, block-based, lightweight library over CoreBluetooth. Will clean up your Core Bluetooth related code.
Reasons of using LGBluetooth:
As we know CoreBluetooth is very hard to use – The methods of objects in Core bluetooth are messy
For example connectPeripheral:options: is written in CBCentralManager, discoverCharacteristics:forService is written in Peripheral, writeValue:forCharacteristic:type, readValueForCharacteristic are also in Peripheral.
This messy code makes CoreBluetooth development really painfull. For example if you need to read characteristic value, you need to call “connect” on central object, wait for Central delegate callback, After that call “discover services”, wait peripheral delegate callback, “discover characteristic” which you planned and wait for delegate callback, “readValue” and again wait for delegate callback. What will happen if your program will make 2 connections at once? Handling such cases makes messy code, and raises hundred of bugs.
Don’t worry, now you can forgot about that hell – LGBluetooth uses blocks for callbacks, you can start using modern code and hierarchical calls.
Overview
- Pricing: Free
- Resource Link: https://github.com/LGBluetooth/LGBluetooth
- Resource Maker: LGBluetooth
- Mobile Platform Destination: iOS Apps
- Mobile Platform Support: Native iOS
- Programming Languages: Objective-C
- CocoaPods: LGBluetooth
Related resources
Expression
A cross-platform Swift library for evaluating mathematical expressions at runtime
ZImageCropper
A Swift 5 repo to crop image in any shape
ParallaxView
tvOS controls and extensions that add parallax effect to your application