GithubHelp home page GithubHelp logo

doc22940 / rxbluetoothkit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from polidea/rxbluetoothkit

1.0 1.0 0.0 3.71 MB

iOS & OSX Bluetooth library for RxSwift

License: Apache License 2.0

Ruby 0.29% Swift 98.46% Objective-C 0.06% Shell 1.18%

rxbluetoothkit's Introduction

RxBluetoothKit library logo

CI Status Platform Carthage Compatible

RxBluetoothKit is a Bluetooth library that makes interaction with BLE devices much more pleasant. It's backed by RxSwift and CoreBluetooth and it provides nice API, for both Central and Peripheral modes. All to work with and make your code more readable, reliable and easier to maintain.

Here is a sneak peek of what you can do with RxBluetoothKit:

manager.scanForPeripherals(withServices: [serviceId])
    .take(1)
    .flatMap { $0.peripheral.establishConnection() }
    .flatMap { $0.discoverServices([serviceId]) }
    .flatMap { Observable.from($0) }
    .flatMap { $0.discoverCharacteristics([characteristicId]) }
    .flatMap { Observable.from($0) }
    .flatMap { $0.readValue() }
    .subscribe(onNext: { print("Value: \($0.value)") })

With just 9 lines it started scanning, connecting to the peripheral, discovering service and characteristics and read charecteristic's value!

Central mode features

Peripheral mode features

  • Observing manager states
  • Advertising
  • Observing read & writes
  • Observing subscribe
  • Publishing L2CAP channels
  • And a lot more!

Recent Changes

5.3.0

  • Always connect to retrieved peripherals first (#337)
  • Addded a customisation point for injecting a logger (#341)
  • Fixed L2CAP API to support OSX 10.14 (#345)

All previous changes

Want to migrate from 4.x to 5.x? Check guidelines here.

Installation

CocoaPods

CocoaPods is a dependency manager for CocoaProjects. To integrate RxBluetoothKit into your Xcode project using CocoaPods specify it in your Podfile:

pod 'RxBluetoothKit'

Then, run the following command: $ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks. To integrate RxBluetoothKit into your Xcode project using Carthage specify it in your Cartfile:

github "Polidea/RxBluetoothKit"

Then, run carthage update to build framework and drag RxBluetoothKit.framework into your Xcode project.

Swift Package Manager

Versions >= 4.0 of the library integrate with the Swift Package Manager. In order to do that please specify our project as one of your dependencies in Package.swift file.

Getting Started

Check our Wiki with guidelines to (almost) all library functionalites.

Documentation & Support

Remember to follow Polidea's Blog blog to get all the news and updates!

Contact us

Learn more about Polidea's BLE services here.

Requirements

  • iOS 8.0+
  • OSX 10.10+
  • watchOS 4.0+
  • tvOS 11.0+
  • Xcode 7.3+

Swift versions

  • 3.0 version supports Swift 3.0 and 3.1
  • 5.0 version supports Swift 3.2 and 4.0
  • 5.1.2 version supports Swift 4.1
  • 5.2 version supports Swift 5.0 and 4.2

rxbluetoothkit's People

Contributors

abeintopalo avatar bartoszstelmaszuk avatar bntnam avatar c0diq avatar cierpliwy avatar clementleroy avatar cwalcott avatar dariuszseweryn avatar devandartist avatar emixb avatar kacper20 avatar krausefx avatar krezzoid avatar literator avatar minixt avatar moogle19 avatar orgmir avatar philfi avatar pouljohn1 avatar rafaelplantard avatar robnadin avatar scibas avatar siejkowski avatar vladcorneci avatar vladiulianbogdan avatar wojciech-kulik avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.