This library is a wrapper around the CoreBluetooth framework which provides a modern async API based on Combine Framework.
This package contains two versions of the library:
iOS-BLE-Library
- the library that uses the native CoreBluetooth API.iOS-BLE-Library-Mock
- the library that uses the CoreBluetoothMock API.
The library can be installed using Swift Package Manager.
You can choose between two versions of the library:
Or you can add it as a dependency to your library:
let package = Package(
/// . . .
dependencies: [
// Set the link to the library and choose the version
.package(url: "https://github.com/NordicSemiconductor/IOS-BLE-Library.git", from: "0.3.1"),
],
targets: [
.target(
name: "MyLib",
dependencies: [
// You can use "native" CoreBluetooth API
.product(name: "iOS-BLE-Library", package: "iOS-BLE-Library")
]
),
.testTarget(
name: "MyLibTests",
dependencies: [
"MyLib",
// Or you can use the CoreBluetoothMock API
.product(name: "iOS-BLE-Library-Mock", package: "iOS-BLE-Library")
]
),
]
)
The library can be installed using CocoaPods.
Add the following line to your Podfile:
pod 'IOS-BLE-Library', '~> 0.3.2'
or
pod 'IOS-BLE-Library-Mock', '~> 0.3.2'
Please check the Documentation Page to start using the library.
Also you can check iOS-nRF-Toolbox to find more examples.