├── Sources
├── LittleBlueToothForTest
│ ├── Classes
│ ├── Info.plist
│ ├── LittleBlueTooth.h
│ ├── LittleBlueTooth.swift
│ └── CoreBluetoothTypeAliases.swift
└── LittleBlueTooth
│ ├── Classes
│ ├── CustomOperator
│ │ ├── JustLittleBlueTooth.swift
│ │ ├── Log.swift
│ │ ├── Listen.swift
│ │ ├── ReadAndWrite.swift
│ │ └── ScanAndConnection.swift
│ ├── Utilities
│ │ ├── ShareAndReplayOperator
│ │ │ ├── ShareReplay.swift
│ │ │ ├── ReplaySubjectSubscription.swift
│ │ │ └── ReplaySubject.swift
│ │ └── Utilities.swift
│ ├── Model
│ │ ├── Loggable.swift
│ │ ├── LittleBluetoothConfiguration.swift
│ │ ├── CentralRestorer.swift
│ │ ├── AdvertisingData.swift
│ │ ├── PeripheralDiscovery.swift
│ │ └── LittleBlueToothCharacteristic.swift
│ ├── Error
│ │ └── LittleBlueToothError.swift
│ ├── Extension
│ │ └── Helper.swift
│ └── Proxies
│ │ ├── CBCentralManagerDelegateProxy.swift
│ │ └── CBPeripheralProxy.swift
│ ├── LittleBlueTooth.h
│ ├── Info.plist
│ └── CoreBluetoothTypeAliases.swift
├── README
└── Icon.png
├── .jazzy.yaml
├── LittleBlueTooth.xcodeproj
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ ├── andreafinollo.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ │ └── Andrea.xcuserdatad
│ │ │ └── IDEFindNavigatorScopes.plist
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
├── xcuserdata
│ ├── andreafinollo.xcuserdatad
│ │ └── xcschemes
│ │ │ └── xcschememanagement.plist
│ └── Andrea.xcuserdatad
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── LittleBlueToothTests.xcscheme
├── LittleBlueToothTests_Info.plist
├── LittleBlueTooth_Info.plist
└── xcshareddata
│ └── xcschemes
│ └── LittleBlueTooth.xcscheme
├── codecov.yml
├── .github
└── workflows
│ ├── swift3.yml
│ ├── swift.yml
│ └── swift2.yml
├── Tests
└── LittleBlueToothTests
│ ├── Info.plist
│ ├── LittleBlueToothTests.swift
│ ├── WriteWithoutResponse.swift
│ ├── StateRestoration.swift
│ ├── Extraction.swift
│ ├── ScanDiscoveryTest.swift
│ ├── UtilityTest.swift
│ ├── Mocks
│ └── MockPeripherals.swift
│ ├── ConnectionTest.swift
│ ├── WriteReadTest.swift
│ ├── ListenTest.swift
│ └── CustomOperator.swift
├── LittleBlueTooth copy-Info.plist
├── LICENSE
├── .gitignore
└── Package.swift
/Sources/LittleBlueToothForTest/Classes:
--------------------------------------------------------------------------------
1 | ../LittleBlueTooth/Classes
--------------------------------------------------------------------------------
/Sources/LittleBlueToothForTest/Info.plist:
--------------------------------------------------------------------------------
1 | ../LittleBlueTooth/Info.plist
--------------------------------------------------------------------------------
/Sources/LittleBlueToothForTest/LittleBlueTooth.h:
--------------------------------------------------------------------------------
1 | ../LittleBlueTooth/LittleBlueTooth.h
--------------------------------------------------------------------------------
/README/Icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrAma999/LittleBlueTooth/HEAD/README/Icon.png
--------------------------------------------------------------------------------
/Sources/LittleBlueToothForTest/LittleBlueTooth.swift:
--------------------------------------------------------------------------------
1 | ../LittleBlueTooth/LittleBlueTooth.swift
--------------------------------------------------------------------------------
/Sources/LittleBlueToothForTest/CoreBluetoothTypeAliases.swift:
--------------------------------------------------------------------------------
1 | ../LittleBlueTooth/CoreBluetoothTypeAliases.swift
--------------------------------------------------------------------------------
/.jazzy.yaml:
--------------------------------------------------------------------------------
1 | author_url: https://www.facebook.com/CloudInTouchLabs
2 | author: Andrea Finollo
3 | github_url: https://github.com/DrAma999
4 | theme: fullwidth
5 | module: LittleBlueTooth
6 |
--------------------------------------------------------------------------------
/LittleBlueTooth.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/LittleBlueTooth.xcodeproj/project.xcworkspace/xcuserdata/andreafinollo.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/DrAma999/LittleBlueTooth/HEAD/LittleBlueTooth.xcodeproj/project.xcworkspace/xcuserdata/andreafinollo.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/LittleBlueTooth.xcodeproj/project.xcworkspace/xcuserdata/Andrea.xcuserdatad/IDEFindNavigatorScopes.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/LittleBlueTooth.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/LittleBlueTooth.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/codecov.yml:
--------------------------------------------------------------------------------
1 | codecov:
2 | require_ci_to_pass: yes
3 |
4 | coverage:
5 | precision: 2
6 | round: down
7 | range: "70...100"
8 |
9 | parsers:
10 | gcov:
11 | branch_detection:
12 | conditional: yes
13 | loop: yes
14 | method: no
15 | macro: no
16 | comment:
17 | layout: "reach,diff,flags,files,footer"
18 | behavior: default
19 | require_changes: no
20 |
--------------------------------------------------------------------------------
/.github/workflows/swift3.yml:
--------------------------------------------------------------------------------
1 | name: Publish Documentation
2 | on:
3 | release:
4 | types: [published]
5 | jobs:
6 | deploy_docs:
7 | runs-on: macos-11
8 | steps:
9 | - uses: actions/checkout@v2
10 | - name: Publish Jazzy Docs
11 | uses: steven0351/publish-jazzy-docs@v1
12 | with:
13 | personal_access_token: ${{ secrets.JAZZY }}
14 | config: .jazzy.yaml
15 |
--------------------------------------------------------------------------------
/Sources/LittleBlueTooth/Classes/CustomOperator/JustLittleBlueTooth.swift:
--------------------------------------------------------------------------------
1 | //
2 | // JustLittleBlueTooth.swift
3 | // LittleBlueTooth
4 | //
5 | // Created by Andrea Finollo on 28/08/2020.
6 | //
7 |
8 | import Foundation
9 | import Combine
10 | /// Syntactic sugar to start a `LittleBlueTooth` pipeline
11 | public var StartLittleBlueTooth: Result<(), LittleBluetoothError>.Publisher {
12 | Just(()).setFailureType(to: LittleBluetoothError.self)
13 | }
14 |
--------------------------------------------------------------------------------
/LittleBlueTooth.xcodeproj/xcuserdata/andreafinollo.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | LittleBlueTooth.xcscheme_^#shared#^_
8 |
9 | orderHint
10 | 1
11 |
12 |
13 |
14 |
15 |
--------------------------------------------------------------------------------
/Sources/LittleBlueTooth/Classes/CustomOperator/Log.swift:
--------------------------------------------------------------------------------
1 | //
2 | // Log.swift
3 | // LittleBlueTooth
4 | //
5 | // Created by Andrea Finollo on 29/01/21.
6 | //
7 |
8 | import Foundation
9 | import Combine
10 |
11 | extension Publisher {
12 | func customPrint(_ prefix: String = "", to: TextOutputStream? = nil, isEnabled: Bool = true) -> AnyPublisher {
13 | if isEnabled {
14 | return print(prefix, to: to).eraseToAnyPublisher()
15 | }
16 | return AnyPublisher(self)
17 | }
18 | }
19 |
--------------------------------------------------------------------------------
/Sources/LittleBlueTooth/Classes/Utilities/ShareAndReplayOperator/ShareReplay.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 | import Combine
3 |
4 | extension Publisher {
5 | /// Provides a subject that shares a single subscription to the upstream publisher and replays at most `bufferSize` items emitted by that publisher
6 | /// - Parameter bufferSize: limits the number of items that can be replayed
7 | public func shareReplay(_ bufferSize: Int) -> AnyPublisher