larryzhang преди 2 години
родител
ревизия
54b91ea5ac
променени са 2 файла, в които са добавени 20 реда и са изтрити 19 реда
  1. 11
    10
      README.md
  2. 9
    9
      README_CN.md

+ 11
- 10
README.md Целия файл

@@ -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;
```

+ 9
- 9
README_CN.md Целия файл

@@ -12,16 +12,16 @@
最低版本iOS 8.0
设备所使用的蓝牙版本需要4.0及以上
## 二、开始使用
1.将 TPMSBleSDK.framework 导入Xcode工程;
2.在info.plist文件中加入“Privacy - Bluetooth Always Usage Description”
3.在需要使用的 控制器.m 中导入 #import <TPMSBleSDK/ELTPMSBleManager.h>,并遵守 < ELTPMSBleManagerDelegate> 协议;
4.设置代理
##### 1.将 TPMSBleSDK.framework 导入Xcode工程;
##### 2.在info.plist文件中加入“Privacy - Bluetooth Always Usage Description”;
##### 3.在需要使用的 控制器.m 中导入 #import <TPMSBleSDK/ELTPMSBleManager.h>,并遵守 < ELTPMSBleManagerDelegate> 协议;
##### 4.设置代理

```
[ELTPMSBleManager shareManager].delegate = self;
```

5.实现代理方法
##### 5.实现代理方法

```
-(void)TPMSBleManagerUpdateBleState:(TPMSBluetoothState)state;
@@ -29,7 +29,7 @@
```

## 三、获取广播数据
### 1.判断手机蓝牙是否可用
##### 1.判断手机蓝牙是否可用
可通过代理方法:
```
-(void)TPMSBleManagerUpdateBleState:(TPMSBluetoothState)state;
@@ -40,15 +40,15 @@
[ELTPMSBleManager shareManager].isOn;
```
获取当前蓝牙是否打开可用;
### 2.开始扫描
##### 2.开始扫描
```
[[ELTPMSBleManager shareManager] startScan];
```
### 3.停止扫描
##### 3.停止扫描
```
[[ELTPMSBleManager shareManager] stopScan];
```
### 4.代理方法说明
##### 4.代理方法说明
```
-(void)TPMSBleManagerUpdateBleState:(TPMSBluetoothState)state;
```

Loading…
Отказ
Запис