The purpose of this SDK is to establish a connection with the BACtrack Breathalyzer products' SDK and enable users to take a test and obtain BAC results. Additionally, users can retrieve general information about the Breathalyzer, such as the serial number and battery. For SDK documentation, visit https://developer.bactrack.com/
If you haven’t already, install the latest version of CocoaPods.
If you don’t have an existing Podfile, run the following command to create one:
pod init
Add this line to your Podfile:
pod 'BreathalyzerSDK'
Run the following command:
pod install
Don’t forget to use the .xcworkspace file to open your project in Xcode, instead of the .xcodeproj file, from here on out.
In the future, to update to the latest version of the SDK, run:
pod update BreathalyzerSDK
The demo project can be found under the Run Examples/BreathalyzerSDKDemo
folder
In order to start testing, you need to add your API key to BactrackViewController.h
.
After that, you can follow the next steps:
- Run the app
- Turn on your breathalyzer.
- Once the nearby device is discovered, tap on
Connect Breathalyzer
to establish a connection. - You can now fetch information such as the serial number or battery status.
- Additionally, you can also tap on
Start Test Countdown
to start taking a test
See video for usage reference below: