Skip to content

Commit

Permalink
5.1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
pouljohn1 committed Jun 8, 2018
1 parent 1db43f6 commit 93ae1de
Show file tree
Hide file tree
Showing 68 changed files with 3,132 additions and 1,332 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 5.1.1
- Fixed `PeripheralManager` not public (#264)

# 5.1.0
- Added support for `CBPeripheralManager`. Read `PeripheralManager` documentation for more info (#166)
- Deprecated `RestoredState` and `CentralManager.init(queue:options:onWillRestoreCentralManagerState:)`. From now on please use corresponding `CentralManagerRestoredState` and `CentralManager.init(queue:options:onWillRestoreCentralManagerState:)`
Expand Down
2 changes: 1 addition & 1 deletion RxBluetoothKit.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "RxBluetoothKit"
s.version = "5.1.0"
s.version = "5.1.1"
s.summary = "Bluetooth library for RxSwift"

s.description = <<-DESC
Expand Down
74 changes: 62 additions & 12 deletions docs/Classes.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<a title="Classes Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="index.html">RxBluetoothKit Docs</a> (78% documented)</p>
<p><a href="index.html">RxBluetoothKit Docs</a> (80% documented)</p>
<p class="header-right"><a href="https://github.com/Polidea/RxBluetoothKit"><img src="img/gh.png"/>View on GitHub</a></p>
</div>
</header>
Expand Down Expand Up @@ -42,6 +42,9 @@
<li class="nav-group-task">
<a href="Classes/Peripheral.html">Peripheral</a>
</li>
<li class="nav-group-task">
<a href="Classes/PeripheralManager.html">PeripheralManager</a>
</li>
<li class="nav-group-task">
<a href="Classes/RxBluetoothKitLog.html">RxBluetoothKitLog</a>
</li>
Expand Down Expand Up @@ -73,9 +76,6 @@
<li class="nav-group-name">
<a href="Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="Extensions/PeripheralManager.html">PeripheralManager</a>
</li>
<li class="nav-group-task">
<a href="Extensions/Reactive.html">Reactive</a>
</li>
Expand Down Expand Up @@ -214,7 +214,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/CentralManager.swift#L27-L307">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/CentralManager.swift#L27-L307">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -249,7 +249,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/Characteristic.swift#L6-L180">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/Characteristic.swift#L6-L180">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -286,7 +286,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/Descriptor.swift#L8-L104">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/Descriptor.swift#L8-L104">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -321,7 +321,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/Logging.swift#L6-L95">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/Logging.swift#L6-L95">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -357,7 +357,57 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/Peripheral.swift#L10-L856">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/Peripheral.swift#L10-L856">Show on GitHub</a>
</div>
</section>
</div>
</li>
</ul>
</div>
<div class="task-group">
<ul>
<li class="item">
<div>
<code>
<a name="/s:14RxBluetoothKit17PeripheralManagerC"></a>
<a name="//apple_ref/swift/Class/PeripheralManager" class="dashAnchor"></a>
<a class="token" href="#/s:14RxBluetoothKit17PeripheralManagerC">PeripheralManager</a>
</code>
</div>
<div class="height-container">
<div class="pointer-container"></div>
<section class="section">
<div class="pointer"></div>
<div class="abstract">
<p>PeripheralManager is a class implementing ReactiveX API which wraps all the Core Bluetooth Peripheral&rsquo;s functions, that allow to
advertise, to publish L2CAP channels and more.
You can start using this class by adding services and starting advertising.
Before calling any public <code>PeripheralManager</code>&lsquo;s functions you should make sure that Bluetooth is turned on and powered on. It can be done
by <code>observeState()</code>, observing it&rsquo;s value and then chaining it with <code>add(_:)</code> and <code>startAdvertising(_:)</code>:</p>
<pre class="highlight swift"><code><span class="k">let</span> <span class="nv">disposable</span> <span class="o">=</span> <span class="n">centralManager</span><span class="o">.</span><span class="n">observeState</span>
<span class="o">.</span><span class="nf">startWith</span><span class="p">(</span><span class="n">centralManager</span><span class="o">.</span><span class="n">state</span><span class="p">)</span>
<span class="o">.</span><span class="n">filter</span> <span class="p">{</span> <span class="nv">$0</span> <span class="o">==</span> <span class="o">.</span><span class="n">poweredOn</span> <span class="p">}</span>
<span class="o">.</span><span class="nf">take</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span>
<span class="o">.</span><span class="n">flatMap</span> <span class="p">{</span> <span class="n">centralManager</span><span class="o">.</span><span class="nf">add</span><span class="p">(</span><span class="n">myService</span><span class="p">)</span> <span class="p">}</span>
<span class="o">.</span><span class="n">flatMap</span> <span class="p">{</span> <span class="n">centralManager</span><span class="o">.</span><span class="nf">startAdvertising</span><span class="p">(</span><span class="n">myAdvertisementData</span><span class="p">)</span> <span class="p">}</span>
</code></pre>

<p>As a result, your peripheral will start advertising. To stop advertising simply dispose it:</p>
<pre class="highlight swift"><code><span class="n">disposable</span><span class="o">.</span><span class="nf">dispose</span><span class="p">()</span>
</code></pre>

<a href="Classes/PeripheralManager.html" class="slightly-smaller">See more</a>
</div>
<div class="declaration">
<h4>Declaration</h4>
<div class="language">
<p class="aside-title">Swift</p>
<pre class="highlight swift"><code><span class="kd">public</span> <span class="kd">class</span> <span class="kt">PeripheralManager</span><span class="p">:</span> <span class="kt"><a href="Protocols/ManagerType.html">ManagerType</a></span></code></pre>

</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/PeripheralManager.swift#L22-L376">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -393,7 +443,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/ScannedPeripheral.swift#L6-L22">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/ScannedPeripheral.swift#L6-L22">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -428,7 +478,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/Service.swift#L6-L81">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/Service.swift#L6-L81">Show on GitHub</a>
</div>
</section>
</div>
Expand All @@ -438,7 +488,7 @@ <h4>Declaration</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://polidea.com" target="_blank" rel="external">Polidea</a>. All rights reserved. (Last updated: 2018-05-25)</p>
<p>&copy; 2018 <a class="link" href="https://polidea.com" target="_blank" rel="external">Polidea</a>. All rights reserved. (Last updated: 2018-06-08)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down
38 changes: 19 additions & 19 deletions docs/Classes/CentralManager.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<a title="CentralManager Class Reference"></a>
<header>
<div class="content-wrapper">
<p><a href="../index.html">RxBluetoothKit Docs</a> (78% documented)</p>
<p><a href="../index.html">RxBluetoothKit Docs</a> (80% documented)</p>
<p class="header-right"><a href="https://github.com/Polidea/RxBluetoothKit"><img src="../img/gh.png"/>View on GitHub</a></p>
</div>
</header>
Expand Down Expand Up @@ -43,6 +43,9 @@
<li class="nav-group-task">
<a href="../Classes/Peripheral.html">Peripheral</a>
</li>
<li class="nav-group-task">
<a href="../Classes/PeripheralManager.html">PeripheralManager</a>
</li>
<li class="nav-group-task">
<a href="../Classes/RxBluetoothKitLog.html">RxBluetoothKitLog</a>
</li>
Expand Down Expand Up @@ -74,9 +77,6 @@
<li class="nav-group-name">
<a href="../Extensions.html">Extensions</a>
<ul class="nav-group-tasks">
<li class="nav-group-task">
<a href="../Extensions/PeripheralManager.html">PeripheralManager</a>
</li>
<li class="nav-group-task">
<a href="../Extensions/Reactive.html">Reactive</a>
</li>
Expand Down Expand Up @@ -220,7 +220,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/CentralManager.swift#L30">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/CentralManager.swift#L30">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -250,7 +250,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/CentralManager.swift#L">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/CentralManager.swift#L">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -329,7 +329,7 @@ <h4>Parameters</h4>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/CentralManager.swift#L73-L83">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/CentralManager.swift#L73-L83">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -361,7 +361,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/CentralManager.swift#L88-L90">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/CentralManager.swift#L88-L90">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -401,7 +401,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/CentralManager.swift#L94-L96">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/CentralManager.swift#L94-L96">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -430,7 +430,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/CentralManager.swift#L98-L100">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/CentralManager.swift#L98-L100">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -540,7 +540,7 @@ <h4>Return Value</h4>
<p>Infinite stream of scanned peripherals.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/CentralManager.swift#L137-L175">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/CentralManager.swift#L137-L175">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -635,7 +635,7 @@ <h4>Return Value</h4>
<p><code>Observable</code> which emits next event after connection is established.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/CentralManager.swift#L200-L203">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/CentralManager.swift#L200-L203">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -701,7 +701,7 @@ <h4>Return Value</h4>
<code><a href="../Classes/Service.html">Service</a></code>s with UUIDs specified in the <code>serviceUUIDs</code> parameter.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/CentralManager.swift#L213-L216">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/CentralManager.swift#L213-L216">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -754,7 +754,7 @@ <h4>Return Value</h4>
<p>Retrieved <code><a href="../Classes/Peripheral.html">Peripheral</a></code>s.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/CentralManager.swift#L222-L225">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/CentralManager.swift#L222-L225">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -831,7 +831,7 @@ <h4>Return Value</h4>
<p>Observable which emits next events when <code>peripheral</code> was connected.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/CentralManager.swift#L243-L251">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/CentralManager.swift#L243-L251">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -899,7 +899,7 @@ <h4>Return Value</h4>
if it wasn&rsquo;t the <code>cancelPeripheralConnection</code> call.</p>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/CentralManager.swift#L268-L284">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/CentralManager.swift#L268-L284">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -942,7 +942,7 @@ <h4>Declaration</h4>
</div>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/CentralManager+RestoredState.swift#L16-L23">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/CentralManager+RestoredState.swift#L16-L23">Show on GitHub</a>
</div>
</section>
</div>
Expand Down Expand Up @@ -1030,7 +1030,7 @@ <h4>Parameters</h4>
</table>
</div>
<div class="slightly-smaller">
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.0/Source/CentralManager+RestoredState.swift#L35-L42">Show on GitHub</a>
<a href="https://github.com/Polidea/RxBluetoothKit/tree/5.1.1/Source/CentralManager+RestoredState.swift#L35-L42">Show on GitHub</a>
</div>
</section>
</div>
Expand All @@ -1040,7 +1040,7 @@ <h4>Parameters</h4>
</section>
</section>
<section id="footer">
<p>&copy; 2018 <a class="link" href="https://polidea.com" target="_blank" rel="external">Polidea</a>. All rights reserved. (Last updated: 2018-05-25)</p>
<p>&copy; 2018 <a class="link" href="https://polidea.com" target="_blank" rel="external">Polidea</a>. All rights reserved. (Last updated: 2018-06-08)</p>
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v0.9.1</a>, a <a class="link" href="http://realm.io" target="_blank" rel="external">Realm</a> project.</p>
</section>
</article>
Expand Down
Loading

0 comments on commit 93ae1de

Please sign in to comment.