Skip to content

Commit 1db43f6

Browse files
authored
Merge pull request #266 from Polidea/fix/peripheral_manager_public
Fixed `PeripheralManager` to be public
2 parents 0af1110 + 489ccf0 commit 1db43f6

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

Source/PeripheralManager.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import RxSwift
1919
/// ```
2020
/// disposable.dispose()
2121
/// ```
22-
class PeripheralManager: ManagerType {
22+
public class PeripheralManager: ManagerType {
2323

2424
/// Implementation of CBPeripheralManager
2525
public let manager: CBPeripheralManager

Tests/Autogenerated/_PeripheralManager.generated.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ import CoreBluetooth
33
@testable import RxBluetoothKit
44
import RxSwift
55

6-
/// _PeripheralManager is a class implementing ReactiveX API which wraps all Core Bluetooth _Peripheral's functions allowing to
7-
/// advertising, publishing L2CAP channels and more.
8-
/// You can start using this class by add services and starting advertising.
6+
/// _PeripheralManager is a class implementing ReactiveX API which wraps all the Core Bluetooth _Peripheral's functions, that allow to
7+
/// advertise, to publish L2CAP channels and more.
8+
/// You can start using this class by adding services and starting advertising.
99
/// Before calling any public `_PeripheralManager`'s functions you should make sure that Bluetooth is turned on and powered on. It can be done
10-
/// by calling and observing returned value of `observeState()` and then chaining it with `add(_:)` with `startAdvertising(_:)`:
10+
/// by `observeState()`, observing it's value and then chaining it with `add(_:)` and `startAdvertising(_:)`:
1111
/// ```
1212
/// let disposable = centralManager.observeState
1313
/// .startWith(centralManager.state)
@@ -16,7 +16,7 @@ import RxSwift
1616
/// .flatMap { centralManager.add(myService) }
1717
/// .flatMap { centralManager.startAdvertising(myAdvertisementData) }
1818
/// ```
19-
/// As a result your peripheral will start advertising. To stop advertising simply dispose it:
19+
/// As a result, your peripheral will start advertising. To stop advertising simply dispose it:
2020
/// ```
2121
/// disposable.dispose()
2222
/// ```
@@ -86,12 +86,12 @@ class _PeripheralManager: _ManagerType {
8686
/// refer to ``StartAdvertisingResult` documentation.
8787
///
8888
/// There can be only one ongoing advertising (CoreBluetooth limit).
89-
/// It will return `advertisingInProgress` error if this method will be called when
89+
/// It will return `advertisingInProgress` error if this method is called when
9090
/// it is already advertising.
9191
///
9292
/// Advertising is automatically stopped just after disposing of the subscription.
9393
///
94-
/// It can return `_BluetoothError.advertisingStartFailed` error when start advertisement failed
94+
/// It can return `_BluetoothError.advertisingStartFailed` error, when start advertisement failed
9595
///
9696
/// - parameter advertisementData: Services of peripherals to search for. Nil value will accept all peripherals.
9797
/// - returns: Infinite observable which emit `StartAdvertisingResult` when advertisement started.
@@ -150,9 +150,9 @@ class _PeripheralManager: _ManagerType {
150150

151151
// MARK: Services
152152

153-
/// Function that triggers `CBPeripheralManagerMock.add(_:)` method and waits for
153+
/// Function that triggers `CBPeripheralManagerMock.add(_:)` and waits for
154154
/// delegate `CBPeripheralManagerDelegate.peripheralManager(_:didAdd:error:)` result.
155-
/// If it will receive non nil error in result than `Observable` will emit `_BluetoothError.addingServiceFailed` error.
155+
/// If it receives a non nil in the result, it will emit `_BluetoothError.addingServiceFailed` error.
156156
/// Add method is called after subscription to `Observable` is made.
157157
/// - Parameter service: `_Characteristic` to read value from
158158
/// - Returns: `Single` which emits `next` with given characteristic when value is ready to read.
@@ -295,7 +295,7 @@ class _PeripheralManager: _ManagerType {
295295

296296
#if os(iOS) || os(tvOS) || os(watchOS)
297297

298-
/// Starts publishing L2CAP channel on subscription. It create inifinite observable
298+
/// Starts publishing L2CAP channel on a subscription. It creates an infinite observable
299299
/// which emits only one next value, of `CBL2CAPPSM` type, just
300300
/// after L2CAP channel has been published.
301301
///

0 commit comments

Comments
 (0)