|
|
@@ -8,29 +8,30 @@ |
|
|
|
|---------|------------:| ---------: | ----------------- | |
|
|
|
| v1.0 | 2019/07/08 |JosonXiong | Preliminary version | |
|
|
|
|v1.1.1 |2023/06/26 |Larry| Document filing | |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
## Table of Contents |
|
|
|
|
|
|
|
## 1st、The conditions of use |
|
|
|
Minimum version iOS 8.0 |
|
|
|
The Bluetooth version used by the device requires 4.0 and above. |
|
|
|
|
|
|
|
## 2nd、Use |
|
|
|
1. Import TPSMSleSDK.framework into the Xcode project. |
|
|
|
2. Add "Privacy-Bluetooth Always Usage Description" to the info.plist file; |
|
|
|
3. Import "#import <TPMSBleSDK/ELTPMSBleManager.h>" to the controller you want to use, and follow the "<ELTPMSBleManagerDelegate>" protocol. |
|
|
|
4. Set delegate |
|
|
|
##### 1. Import TPSMSleSDK.framework into the Xcode project. |
|
|
|
##### 2. Add "Privacy-Bluetooth Always Usage Description" to the info.plist file; |
|
|
|
##### 3. Import "#import <TPMSBleSDK/ELTPMSBleManager.h>" to the controller you want to use, and follow the "<ELTPMSBleManagerDelegate>" protocol. |
|
|
|
##### 4. Set delegate |
|
|
|
``` |
|
|
|
[ELTPMSBleManager shareManager].delegate = self; |
|
|
|
``` |
|
|
|
5.Implementing proxy method |
|
|
|
##### 5.Implementing proxy method |
|
|
|
``` |
|
|
|
-(void)TPMSBleManagerUpdateBleState:(TPMSBluetoothState)state; |
|
|
|
-(void)TPMSBleManagerReceiveData:(ELTPMSDataModel *_Nonnull)model; |
|
|
|
``` |
|
|
|
|
|
|
|
## 3rd、Get broadcast data |
|
|
|
### 1.Determine if the phone Bluetooth is available |
|
|
|
##### 1.Determine if the phone Bluetooth is available |
|
|
|
Proxy method: |
|
|
|
``` |
|
|
|
-(void)TPMSBleManagerUpdateBleState:(TPMSBluetoothState)state; |
|
|
@@ -41,15 +42,15 @@ Or |
|
|
|
[ELTPMSBleManager shareManager].isOn |
|
|
|
``` |
|
|
|
Get current Bluetooth enabled is available; |
|
|
|
### 2.Start scanning |
|
|
|
##### 2.Start scanning |
|
|
|
``` |
|
|
|
[[ELTPMSBleManager shareManager] startScan]; |
|
|
|
``` |
|
|
|
### 3.Stop scanning |
|
|
|
##### 3.Stop scanning |
|
|
|
``` |
|
|
|
[[ELTPMSBleManager shareManager] stopScan]; |
|
|
|
``` |
|
|
|
### 4.Method description |
|
|
|
##### 4.Method description |
|
|
|
``` |
|
|
|
-(void)TPMSBleManagerUpdateBleState:(TPMSBluetoothState)state; |
|
|
|
``` |