capacitor-plugin-ihealth 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (178) hide show
  1. package/CapacitorPluginIhealth.podspec +35 -0
  2. package/README.md +214 -0
  3. package/android/build.gradle +58 -0
  4. package/android/src/main/AndroidManifest.xml +2 -0
  5. package/android/src/main/java/com/managemyhealth/plugins/ihealth/ihealth.java +11 -0
  6. package/android/src/main/java/com/managemyhealth/plugins/ihealth/ihealthPlugin.java +22 -0
  7. package/android/src/main/res/.gitkeep +0 -0
  8. package/dist/docs.json +450 -0
  9. package/dist/esm/definitions.d.ts +29 -0
  10. package/dist/esm/definitions.js +2 -0
  11. package/dist/esm/definitions.js.map +1 -0
  12. package/dist/esm/index.d.ts +4 -0
  13. package/dist/esm/index.js +7 -0
  14. package/dist/esm/index.js.map +1 -0
  15. package/dist/esm/web.d.ts +37 -0
  16. package/dist/esm/web.js +42 -0
  17. package/dist/esm/web.js.map +1 -0
  18. package/dist/plugin.cjs.js +58 -0
  19. package/dist/plugin.cjs.js.map +1 -0
  20. package/dist/plugin.js +61 -0
  21. package/dist/plugin.js.map +1 -0
  22. package/ios/Plugin/Info.plist +24 -0
  23. package/ios/Plugin/Plugin-Bridging-Header.h +35 -0
  24. package/ios/Plugin/iHealthSDKHeaders/ABI.h +82 -0
  25. package/ios/Plugin/iHealthSDKHeaders/ABIController.h +28 -0
  26. package/ios/Plugin/iHealthSDKHeaders/ABPM.h +144 -0
  27. package/ios/Plugin/iHealthSDKHeaders/ABPMController.h +25 -0
  28. package/ios/Plugin/iHealthSDKHeaders/AM3.h +188 -0
  29. package/ios/Plugin/iHealthSDKHeaders/AM3Controller.h +29 -0
  30. package/ios/Plugin/iHealthSDKHeaders/AM3SController_V2.h +29 -0
  31. package/ios/Plugin/iHealthSDKHeaders/AM3S_V2.h +227 -0
  32. package/ios/Plugin/iHealthSDKHeaders/AM4.h +223 -0
  33. package/ios/Plugin/iHealthSDKHeaders/AM4Controller.h +31 -0
  34. package/ios/Plugin/iHealthSDKHeaders/AM5.h +335 -0
  35. package/ios/Plugin/iHealthSDKHeaders/AM5Controller.h +30 -0
  36. package/ios/Plugin/iHealthSDKHeaders/AM5Header.h +20 -0
  37. package/ios/Plugin/iHealthSDKHeaders/AMHeader.h +27 -0
  38. package/ios/Plugin/iHealthSDKHeaders/AMMacroFile.h +1171 -0
  39. package/ios/Plugin/iHealthSDKHeaders/BG1.h +53 -0
  40. package/ios/Plugin/iHealthSDKHeaders/BG1Controller.h +46 -0
  41. package/ios/Plugin/iHealthSDKHeaders/BG1S.h +64 -0
  42. package/ios/Plugin/iHealthSDKHeaders/BG1SController.h +25 -0
  43. package/ios/Plugin/iHealthSDKHeaders/BG3.h +83 -0
  44. package/ios/Plugin/iHealthSDKHeaders/BG3Controller.h +28 -0
  45. package/ios/Plugin/iHealthSDKHeaders/BG5.h +158 -0
  46. package/ios/Plugin/iHealthSDKHeaders/BG5Controller.h +28 -0
  47. package/ios/Plugin/iHealthSDKHeaders/BG5S.h +294 -0
  48. package/ios/Plugin/iHealthSDKHeaders/BG5SController.h +29 -0
  49. package/ios/Plugin/iHealthSDKHeaders/BGController.h +32 -0
  50. package/ios/Plugin/iHealthSDKHeaders/BGDevice.h +42 -0
  51. package/ios/Plugin/iHealthSDKHeaders/BGHeader.h +23 -0
  52. package/ios/Plugin/iHealthSDKHeaders/BGMacroFile.h +507 -0
  53. package/ios/Plugin/iHealthSDKHeaders/BP3.h +77 -0
  54. package/ios/Plugin/iHealthSDKHeaders/BP3Controller.h +27 -0
  55. package/ios/Plugin/iHealthSDKHeaders/BP3L.h +58 -0
  56. package/ios/Plugin/iHealthSDKHeaders/BP3LController.h +30 -0
  57. package/ios/Plugin/iHealthSDKHeaders/BP5.h +32 -0
  58. package/ios/Plugin/iHealthSDKHeaders/BP5C.h +131 -0
  59. package/ios/Plugin/iHealthSDKHeaders/BP5CController.h +25 -0
  60. package/ios/Plugin/iHealthSDKHeaders/BP5Controller.h +25 -0
  61. package/ios/Plugin/iHealthSDKHeaders/BP5S.h +97 -0
  62. package/ios/Plugin/iHealthSDKHeaders/BP5SController.h +27 -0
  63. package/ios/Plugin/iHealthSDKHeaders/BP5SRW.h +101 -0
  64. package/ios/Plugin/iHealthSDKHeaders/BP5SRWController.h +26 -0
  65. package/ios/Plugin/iHealthSDKHeaders/BP7.h +141 -0
  66. package/ios/Plugin/iHealthSDKHeaders/BP7Controller.h +25 -0
  67. package/ios/Plugin/iHealthSDKHeaders/BP7S.h +106 -0
  68. package/ios/Plugin/iHealthSDKHeaders/BP7SController.h +32 -0
  69. package/ios/Plugin/iHealthSDKHeaders/BPAV10Device.h +15 -0
  70. package/ios/Plugin/iHealthSDKHeaders/BPBTLEDevice.h +17 -0
  71. package/ios/Plugin/iHealthSDKHeaders/BPBV10Device.h +20 -0
  72. package/ios/Plugin/iHealthSDKHeaders/BPContinua.h +56 -0
  73. package/ios/Plugin/iHealthSDKHeaders/BPContinuaController.h +30 -0
  74. package/ios/Plugin/iHealthSDKHeaders/BPController.h +40 -0
  75. package/ios/Plugin/iHealthSDKHeaders/BPDevice.h +131 -0
  76. package/ios/Plugin/iHealthSDKHeaders/BPHeader.h +54 -0
  77. package/ios/Plugin/iHealthSDKHeaders/BPLoopMeasureSettingModel.h +120 -0
  78. package/ios/Plugin/iHealthSDKHeaders/BPM1AE.h +80 -0
  79. package/ios/Plugin/iHealthSDKHeaders/BPMacroFile.h +247 -0
  80. package/ios/Plugin/iHealthSDKHeaders/BPV24Device.h +16 -0
  81. package/ios/Plugin/iHealthSDKHeaders/BPV25Device.h +17 -0
  82. package/ios/Plugin/iHealthSDKHeaders/ConnectDeviceController.h +27 -0
  83. package/ios/Plugin/iHealthSDKHeaders/DFUController.h +160 -0
  84. package/ios/Plugin/iHealthSDKHeaders/DFUDeviceFirmwareInfo.h +56 -0
  85. package/ios/Plugin/iHealthSDKHeaders/DFUHeader.h +19 -0
  86. package/ios/Plugin/iHealthSDKHeaders/DFUMacro.h +264 -0
  87. package/ios/Plugin/iHealthSDKHeaders/DFUServerFirmwareInfo.h +48 -0
  88. package/ios/Plugin/iHealthSDKHeaders/ECG3.h +94 -0
  89. package/ios/Plugin/iHealthSDKHeaders/ECG3Controller.h +30 -0
  90. package/ios/Plugin/iHealthSDKHeaders/ECG3USB.h +145 -0
  91. package/ios/Plugin/iHealthSDKHeaders/ECG3USBController.h +31 -0
  92. package/ios/Plugin/iHealthSDKHeaders/ECGHeader.h +20 -0
  93. package/ios/Plugin/iHealthSDKHeaders/ECGMacroFile.h +84 -0
  94. package/ios/Plugin/iHealthSDKHeaders/HFSmartLink.h +88 -0
  95. package/ios/Plugin/iHealthSDKHeaders/HFSmartLinkDeviceInfo.h +14 -0
  96. package/ios/Plugin/iHealthSDKHeaders/HS2.h +64 -0
  97. package/ios/Plugin/iHealthSDKHeaders/HS2Controller.h +25 -0
  98. package/ios/Plugin/iHealthSDKHeaders/HS2S.h +399 -0
  99. package/ios/Plugin/iHealthSDKHeaders/HS2SController.h +27 -0
  100. package/ios/Plugin/iHealthSDKHeaders/HS3.h +63 -0
  101. package/ios/Plugin/iHealthSDKHeaders/HS3Controller.h +32 -0
  102. package/ios/Plugin/iHealthSDKHeaders/HS4.h +64 -0
  103. package/ios/Plugin/iHealthSDKHeaders/HS4Controller.h +26 -0
  104. package/ios/Plugin/iHealthSDKHeaders/HS5.h +141 -0
  105. package/ios/Plugin/iHealthSDKHeaders/HS5Controller.h +38 -0
  106. package/ios/Plugin/iHealthSDKHeaders/HSHeader.h +25 -0
  107. package/ios/Plugin/iHealthSDKHeaders/HSMacroFile.h +709 -0
  108. package/ios/Plugin/iHealthSDKHeaders/HealthHeader.h +67 -0
  109. package/ios/Plugin/iHealthSDKHeaders/HealthUser.h +126 -0
  110. package/ios/Plugin/iHealthSDKHeaders/IDOBindEnum.h +49 -0
  111. package/ios/Plugin/iHealthSDKHeaders/IDOBlueDataResponse.h +66 -0
  112. package/ios/Plugin/iHealthSDKHeaders/IDOBlueEnum.h +213 -0
  113. package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothBaseModel.h +112 -0
  114. package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothEngine.h +283 -0
  115. package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothManager.h +166 -0
  116. package/ios/Plugin/iHealthSDKHeaders/IDOBluetoothServices.h +75 -0
  117. package/ios/Plugin/iHealthSDKHeaders/IDOCalculateBluetoothModel.h +263 -0
  118. package/ios/Plugin/iHealthSDKHeaders/IDOCommonMacro.h +89 -0
  119. package/ios/Plugin/iHealthSDKHeaders/IDODataExchangeModel.h +128 -0
  120. package/ios/Plugin/iHealthSDKHeaders/IDODataMigrationManager.h +79 -0
  121. package/ios/Plugin/iHealthSDKHeaders/IDOErrorCodeToStr.h +19 -0
  122. package/ios/Plugin/iHealthSDKHeaders/IDOFoundationCommand.h +1178 -0
  123. package/ios/Plugin/iHealthSDKHeaders/IDOGetInfoBluetoothModel.h +1924 -0
  124. package/ios/Plugin/iHealthSDKHeaders/IDOLogEnum.h +165 -0
  125. package/ios/Plugin/iHealthSDKHeaders/IDOPeripheralModel.h +59 -0
  126. package/ios/Plugin/iHealthSDKHeaders/IDORecordDeviceLog.h +56 -0
  127. package/ios/Plugin/iHealthSDKHeaders/IDOSetInfoBluetoothModel.h +1760 -0
  128. package/ios/Plugin/iHealthSDKHeaders/IDOSyncActivityDataModel.h +207 -0
  129. package/ios/Plugin/iHealthSDKHeaders/IDOSyncBpDataModel.h +191 -0
  130. package/ios/Plugin/iHealthSDKHeaders/IDOSyncEnum.h +316 -0
  131. package/ios/Plugin/iHealthSDKHeaders/IDOSyncGpsDataModel.h +133 -0
  132. package/ios/Plugin/iHealthSDKHeaders/IDOSyncHeartRateDataModel.h +442 -0
  133. package/ios/Plugin/iHealthSDKHeaders/IDOSyncManager.h +161 -0
  134. package/ios/Plugin/iHealthSDKHeaders/IDOSyncPressureDataModel.h +158 -0
  135. package/ios/Plugin/iHealthSDKHeaders/IDOSyncSleepDataModel.h +224 -0
  136. package/ios/Plugin/iHealthSDKHeaders/IDOSyncSpo2DataModel.h +175 -0
  137. package/ios/Plugin/iHealthSDKHeaders/IDOSyncSportDataModel.h +221 -0
  138. package/ios/Plugin/iHealthSDKHeaders/IDOSyncSwimDataModel.h +188 -0
  139. package/ios/Plugin/iHealthSDKHeaders/IDOTranEnum.h +93 -0
  140. package/ios/Plugin/iHealthSDKHeaders/IDOTransferFileManager.h +116 -0
  141. package/ios/Plugin/iHealthSDKHeaders/IDOWatchDialInfoModel.h +95 -0
  142. package/ios/Plugin/iHealthSDKHeaders/IDOWatchDialManager.h +75 -0
  143. package/ios/Plugin/iHealthSDKHeaders/IDOWeightBluetoothModel.h +124 -0
  144. package/ios/Plugin/iHealthSDKHeaders/IHSDKCloudUser.h +104 -0
  145. package/ios/Plugin/iHealthSDKHeaders/KN550BT.h +115 -0
  146. package/ios/Plugin/iHealthSDKHeaders/KN550BTController.h +32 -0
  147. package/ios/Plugin/iHealthSDKHeaders/ManageDeviceController.h +34 -0
  148. package/ios/Plugin/iHealthSDKHeaders/NT13B.h +33 -0
  149. package/ios/Plugin/iHealthSDKHeaders/NT13BController.h +28 -0
  150. package/ios/Plugin/iHealthSDKHeaders/NT13BHeader.h +16 -0
  151. package/ios/Plugin/iHealthSDKHeaders/NT13BMacroFile.h +34 -0
  152. package/ios/Plugin/iHealthSDKHeaders/PO1.h +82 -0
  153. package/ios/Plugin/iHealthSDKHeaders/PO1Controller.h +29 -0
  154. package/ios/Plugin/iHealthSDKHeaders/PO3.h +96 -0
  155. package/ios/Plugin/iHealthSDKHeaders/PO3Controller.h +29 -0
  156. package/ios/Plugin/iHealthSDKHeaders/POHeader.h +20 -0
  157. package/ios/Plugin/iHealthSDKHeaders/POMacroFile.h +142 -0
  158. package/ios/Plugin/iHealthSDKHeaders/PT3SBT.h +167 -0
  159. package/ios/Plugin/iHealthSDKHeaders/PT3SBTController.h +27 -0
  160. package/ios/Plugin/iHealthSDKHeaders/PT3SBTMacroFile.h +92 -0
  161. package/ios/Plugin/iHealthSDKHeaders/SDKFlowUpdateDevice.h +196 -0
  162. package/ios/Plugin/iHealthSDKHeaders/SDKInfo.h +30 -0
  163. package/ios/Plugin/iHealthSDKHeaders/SDKUpdateDevice.h +235 -0
  164. package/ios/Plugin/iHealthSDKHeaders/ScanDeviceController.h +47 -0
  165. package/ios/Plugin/iHealthSDKHeaders/THV3.h +104 -0
  166. package/ios/Plugin/iHealthSDKHeaders/THV3Controller.h +30 -0
  167. package/ios/Plugin/iHealthSDKHeaders/THV3Macro.h +17 -0
  168. package/ios/Plugin/iHealthSDKHeaders/TS28B.h +26 -0
  169. package/ios/Plugin/iHealthSDKHeaders/TS28BController.h +142 -0
  170. package/ios/Plugin/iHealthSDKHeaders/TS28BHeader.h +15 -0
  171. package/ios/Plugin/iHealthSDKHeaders/iHealthHS6.h +174 -0
  172. package/ios/Plugin/ihealth.swift +8 -0
  173. package/ios/Plugin/ihealthPlugin.h +10 -0
  174. package/ios/Plugin/ihealthPlugin.m +16 -0
  175. package/ios/Plugin/ihealthPlugin.swift +1502 -0
  176. package/ios/Plugin/libiHealthSDK2.7.8.a +0 -0
  177. package/ios/Plugin/test.m +9 -0
  178. package/package.json +78 -0
@@ -0,0 +1,283 @@
1
+ //
2
+ // IDOBluetoothEngine.h
3
+ // VeryfitSDK
4
+ //
5
+ // Created by hedongyang on 2018/5/31.
6
+ // Copyright © 2018年 hedongyang. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import <CoreBluetooth/CoreBluetooth.h>
11
+
12
+ #if __has_include(<IDOBluetoothInternal/IDOBluetoothInternal.h>)
13
+ #elif __has_include(<IDOBlueProtocol/IDOBlueProtocol.h>)
14
+ #else
15
+ #import "IDOGetInfoBluetoothModel.h"
16
+ #endif
17
+
18
+ @interface IDOBluetoothManagerInfoEngine : NSObject
19
+
20
+ /**
21
+ * 蓝牙管理中心 | Bluetooth Management Center
22
+ */
23
+ @property (nonatomic,strong) CBCentralManager * centralManager;
24
+
25
+ /**
26
+ * 外围设备 | Peripherals
27
+ */
28
+ @property (nonatomic,strong) CBPeripheral * peripheral;
29
+
30
+ /**
31
+ * 蓝牙是否开启 | Is Bluetooth enabled?
32
+ */
33
+ @property (nonatomic,assign,readonly,getter=isPoweredOn) BOOL poweredOn;
34
+
35
+ /**
36
+ * 蓝牙是否连接 | Bluetooth is connected
37
+ */
38
+ @property (nonatomic,assign,readonly,getter=isConnected) BOOL connected;
39
+
40
+ /**
41
+ * 蓝牙是否正在连接中 | Bluetooth is connecting
42
+ */
43
+ @property (nonatomic,assign,readonly,getter=isConnecting) BOOL connecting;
44
+
45
+ /**
46
+ * 命令服务特征 | Command Service Features
47
+ */
48
+ @property (nonatomic,strong) CBCharacteristic * commandCharacteristic;
49
+
50
+ /**
51
+ * 健康服务特征 | Health Service Features
52
+ */
53
+ @property (nonatomic,strong) CBCharacteristic * healthCharacteristic;
54
+
55
+ /**
56
+ * 锐捷定制发送服务特征 | Ruijie write service Features
57
+ */
58
+ @property (nonatomic,strong) CBCharacteristic * customWriteCharacteristic;
59
+
60
+ /**
61
+ * 功能列表 | Function List
62
+ */
63
+ @property (nonatomic,strong) IDOGetDeviceFuncBluetoothModel * funcTableModel;
64
+
65
+ @end
66
+
67
+ @interface IDOBluetoothPeripheralInfoEngine : NSObject
68
+
69
+ /**
70
+ * 当前连接外围设备的uuid | uuid currently connected to peripherals
71
+ */
72
+ @property (nonatomic,copy) NSString * uuidStr;
73
+
74
+ /**
75
+ * 当前连接设备ID | Current connection device ID
76
+ */
77
+ @property (nonatomic,copy) NSString * deviceId;
78
+
79
+ /**
80
+ * 当前连接设备名字 | Current connected device name
81
+ */
82
+ @property (nonatomic,copy) NSString * deviceName;
83
+
84
+ /**
85
+ * 当前连接设备固件版本号 | Current connected device firmware version number
86
+ */
87
+ @property (nonatomic,copy) NSString * version;
88
+
89
+ /**
90
+ * 当前连接设备Mac地址 | Currently connected device Mac address
91
+ */
92
+ @property (nonatomic,copy) NSString * macAddr;
93
+
94
+ /**
95
+ * 当前连接设备授权码 | Currently connected device authorization code
96
+ */
97
+ @property (nonatomic,copy) NSString * authCode;
98
+
99
+ /**
100
+ * 当前设备连接成功的时间 | The time the current device was successfully connected
101
+ */
102
+ @property (nonatomic,strong) NSDate * connectedDate;
103
+
104
+ /**
105
+ * 当前连接设备模式 | Current connected device mode
106
+ */
107
+ @property (nonatomic,assign) NSInteger deviceMode;
108
+
109
+ /**
110
+ * 当前连接设备状态 | Current connected device status
111
+ */
112
+ @property (nonatomic,assign) NSInteger battStatus;
113
+
114
+ /**
115
+ * 当前连接设备电量 | Current connected device power
116
+ */
117
+ @property (nonatomic,assign) NSInteger battLevel;
118
+
119
+ /**
120
+ * 当前连接设备是否重启 | Is the current connected device restarted?
121
+ */
122
+ @property (nonatomic,assign) NSInteger rebootFlag;
123
+
124
+ /**
125
+ * 当前连接设备授权码长度 | Current connection device authorization code length
126
+ */
127
+ @property (nonatomic,assign) NSInteger authLength;
128
+
129
+ /**
130
+ * 当前设备绑定的时间戳 | Current connection device binding timestamp
131
+ */
132
+ @property (nonatomic,assign) NSInteger bindTime;
133
+
134
+ /**
135
+ * 手环的平台 | platform for bracelet
136
+ * 0:nordic, 10:realtek 8762x ,20:cypress psoc6,30:Apollo3
137
+ */
138
+ @property (nonatomic,assign) NSInteger platform;
139
+
140
+ /**
141
+ * 当前连接设备是否绑定 | Is the current connected device bound?
142
+ */
143
+ @property (nonatomic,assign) BOOL isBind;
144
+
145
+ /**
146
+ * 当前连接设备是否配对中 | Is the current connected device pairing?
147
+ */
148
+ @property (nonatomic,assign) BOOL isPairing;
149
+
150
+ /**
151
+ * 当前连接设备是否ota | Is the current connected device ota?
152
+ */
153
+ @property (nonatomic,assign) BOOL isOta;
154
+
155
+ @end
156
+
157
+ @interface IDOBluetoothUserInfoEngine : NSObject
158
+
159
+ /**
160
+ * 用户ID | User ID
161
+ */
162
+ @property (nonatomic,copy) NSString * userId;
163
+
164
+ /**
165
+ * 用户生日 (例如:2018-10-01) | | User birthday (example: 2018-10-01)
166
+ */
167
+ @property (nonatomic,copy) NSString * birthday;
168
+
169
+ /**
170
+ * 用户目标步数 | User target steps
171
+ */
172
+ @property (nonatomic,assign) NSInteger goalStepCount;
173
+
174
+ /**
175
+ * 目标睡眠 (分钟) | Target sleep (minutes)
176
+ */
177
+ @property (nonatomic,assign) NSInteger goalSleepMinute;
178
+
179
+ /**
180
+ * 目标卡路里 | Goal Calories
181
+ */
182
+ @property (nonatomic,assign) NSInteger goalCalorieData;
183
+
184
+ /**
185
+ * 目标距离 | Target distance
186
+ */
187
+ @property (nonatomic,assign) NSInteger goalDistanceData;
188
+
189
+ /**
190
+ * 目标体重 (千克) | Target weight (kg)
191
+ */
192
+ @property (nonatomic,assign) NSInteger goalWeight;
193
+
194
+ /**
195
+ * 用户性别 | User gender
196
+ */
197
+ @property (nonatomic,assign) NSInteger sex;
198
+
199
+ /**
200
+ * 用户体重 | User weight
201
+ */
202
+ @property (nonatomic,assign) NSInteger weight;
203
+
204
+ /**
205
+ * 用户升高 | User rises
206
+ */
207
+ @property (nonatomic,assign) NSInteger height;
208
+
209
+ /**
210
+ * 是否登陆 | Login
211
+ */
212
+ @property (nonatomic,assign) BOOL isLogin;
213
+
214
+ @end
215
+
216
+ @interface IDOBluetoothAppInfoEngine : NSObject
217
+
218
+ /**
219
+ * 设备名字 | Device Name
220
+ */
221
+ @property (nonatomic,copy) NSString * iphoneName;
222
+
223
+ /**
224
+ * 手机系统版本 | Mobile phone system version
225
+ */
226
+ @property (nonatomic,copy) NSString * sysVersion;
227
+
228
+ /**
229
+ * sdk版本 | sdk version
230
+ */
231
+ @property (nonatomic,copy) NSString * sdkVersion;
232
+
233
+ @end
234
+
235
+ @interface IDOBluetoothUnitInfoEngine : NSObject
236
+
237
+ /**
238
+ * 时间格式是否12小时制 | Is the time format 12-hour format?
239
+ */
240
+ @property (nonatomic,assign) BOOL is12Hour;
241
+
242
+ /**
243
+ * 语言单位 | Language unit
244
+ */
245
+ @property (nonatomic,assign) NSInteger language;
246
+
247
+ /**
248
+ * 距离单位 | Distance unit
249
+ */
250
+ @property (nonatomic,assign) NSInteger distUnit;
251
+
252
+ /**
253
+ * 体重单位 | Weight unit
254
+ */
255
+ @property (nonatomic,assign) NSInteger weightUnit;
256
+
257
+ /**
258
+ * 温度单位 | Temperature unit
259
+ */
260
+ @property (nonatomic,assign) NSInteger tempUnit;
261
+
262
+ /**
263
+ * 走路步伐单位 | Walking pace unit
264
+ */
265
+ @property (nonatomic,assign) NSInteger strideWalkUnit;
266
+
267
+ /**
268
+ * 跑步步伐单位 | Running pace unit
269
+ */
270
+ @property (nonatomic,assign) NSInteger strideRunUnit;
271
+
272
+ @end
273
+
274
+ @interface IDOBluetoothEngine : NSObject
275
+ + (IDOBluetoothEngine *)shareInstance;
276
+ - (void)deserialization;
277
+ @property (nonatomic,strong) IDOBluetoothManagerInfoEngine * managerEngine;
278
+ @property (nonatomic,strong) IDOBluetoothPeripheralInfoEngine * peripheralEngine;
279
+ @property (nonatomic,strong) IDOBluetoothUserInfoEngine * userEngine;
280
+ @property (nonatomic,strong) IDOBluetoothAppInfoEngine * appEngine;
281
+ @property (nonatomic,strong) IDOBluetoothUnitInfoEngine * unitEngine;
282
+ @end
283
+
@@ -0,0 +1,166 @@
1
+ //
2
+ // IDOBluetoothManager.h
3
+ // VeryfitSDK
4
+ //
5
+ // Created by hedongyang on 2018/6/4.
6
+ // Copyright © 2018年 hedongyang. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #import <CoreBluetooth/CoreBluetooth.h>
11
+ #if __has_include(<IDOBluetoothInternal/IDOBluetoothInternal.h>)
12
+ #elif __has_include(<IDOBluetooth/IDOBluetooth.h>)
13
+ #else
14
+ #import "IDOBlueEnum.h"
15
+ #import "IDOPeripheralModel.h"
16
+ #endif
17
+
18
+ @class IDOBluetoothManager;
19
+
20
+ @protocol IDOBluetoothManagerDelegate<NSObject>
21
+
22
+ /**
23
+ * @brief 扫描所有外围设备 | Scan all peripherals
24
+ * @param manager IDO蓝牙管理中心 | IDO Bluetooth Management Center
25
+ * @param allDevices 扫描所有外围设备(包括OTA设备集合) | Scan all peripherals (including OTA device collections)
26
+ * @param otaDevices OTA 设备集合 | OTA Device Collection
27
+ */
28
+ - (void)bluetoothManager:(IDOBluetoothManager *)manager
29
+ allDevices:(NSArray <IDOPeripheralModel *>*)allDevices
30
+ otaDevices:(NSArray <IDOPeripheralModel *>*)otaDevices;
31
+
32
+
33
+ /**
34
+ * @brief 连接设备成功回调 | Connected device successfully callback
35
+ * @param manager IDO蓝牙管理中心 | IDO Bluetooth Management Center
36
+ * @param centerManager 蓝牙管理中心 | Bluetooth Management Center
37
+ * @param peripheral 外围设备 | Peripherals
38
+ * @param isOtaMode 连接是否在OTA模式 | Is the connection in OTA mode?
39
+ * @return 是或否 | yes or no
40
+ */
41
+ - (BOOL)bluetoothManager:(IDOBluetoothManager *)manager
42
+ centerManager:(CBCentralManager *)centerManager
43
+ didConnectPeripheral:(CBPeripheral *)peripheral
44
+ isOatMode:(BOOL)isOtaMode;
45
+
46
+ /**
47
+ * @brief 蓝牙管理状态 | Bluetooth management status
48
+ * @param manager IDO蓝牙管理中心 | IDO Bluetooth Management Center
49
+ * @param state 状态 | Status
50
+ */
51
+ - (void)bluetoothManager:(IDOBluetoothManager *)manager
52
+ didUpdateState:(IDO_BLUETOOTH_MANAGER_STATE)state;
53
+
54
+ /**
55
+ * @brief 连接设备错误回调,当解绑设备断开连接时不会回调此方法
56
+ * Connection Device Error Callback,This method is not called back when the unbound device is disconnected.
57
+ * @param manager IDO蓝牙管理中心 | IDO Bluetooth Management Center
58
+ * @param error 错误信息 | Error message
59
+ */
60
+ - (void)bluetoothManager:(IDOBluetoothManager *)manager
61
+ connectPeripheralError:(NSError *)error;
62
+
63
+ @end
64
+
65
+ @interface IDOBluetoothManager : NSObject
66
+
67
+ /**
68
+ 设置代理 | Setting up the agent
69
+ */
70
+ @property (nonatomic,weak) id<IDOBluetoothManagerDelegate> delegate;
71
+
72
+ /**
73
+ * 自动扫描连接超时时长 默认 20
74
+ * Auto Scan Connection Timeout Duration Default 20
75
+ */
76
+ @property (nonatomic,assign) NSInteger timeout;
77
+
78
+ /**
79
+ * 设置扫描过滤信号弱的设备 默认值 80 大于80会被过滤
80
+ * Set the device with weak scan filtering signal. Default value 80 is greater than 80 will be filtered.
81
+ */
82
+ @property (nonatomic,assign) NSInteger rssiNum;
83
+
84
+ /**
85
+ * 是否启动超时,间隔扫描 默认 yes 默认10秒间隔扫描一次
86
+ * Whether to start timeout, interval scan Default yes Default scan at 10-second intervals
87
+ */
88
+ @property (nonatomic,assign) BOOL isIntervalScan;
89
+
90
+ /**
91
+ * 是否需要重连机制 默认 YES 如果设置 NO 断线后不会重连
92
+ * Whether a reconnect mechanism is required,if NO set,connection will not be reconnected
93
+ */
94
+ @property (nonatomic,assign) BOOL isReconnect;
95
+
96
+ /**
97
+ * 设置扫描间隔时长 默认 10秒 如果不启动超时间隔扫描,则无效
98
+ * Set the scan interval to 10 seconds by default.if timeout interval scanning is not started, it is not valid.
99
+ */
100
+ @property (nonatomic,assign) NSInteger autoScanInterval;
101
+
102
+ /**
103
+ 蓝牙扫描设备模式 | Bluetooth Scanning Device Mode
104
+ */
105
+ @property (nonatomic,assign,readonly) IDO_SCAN_DEVICE_MODE scanMode;
106
+
107
+ /**
108
+ 蓝牙管理连接状态 | Bluetooth management connection status
109
+ */
110
+ @property (nonatomic,assign,readonly) IDO_BLUETOOTH_MANAGER_STATE state;
111
+
112
+ /**
113
+ 蓝牙连接错误码 | Bluetooth connection error code
114
+ */
115
+ @property (nonatomic,assign,readonly) IDO_BLUETOOTH_CONNECT_ERROR_TYPE errorCode;
116
+
117
+ /**
118
+ * 手动点击连接设备的总时长
119
+ * Total time to manually click on the connected device
120
+ */
121
+ @property (nonatomic,assign,readonly) NSInteger manualConnectTotalTime;
122
+
123
+ /**
124
+ * 自动扫描到成功连接设备的总时长
125
+ * Total time from automatic scanning to successful connection to the device
126
+ */
127
+ @property (nonatomic,assign,readonly) NSInteger autoConnectTotalTime;
128
+
129
+ /**
130
+ * @brief 初始化IDO蓝牙管理中心对象
131
+ * Initialize IDO the Bluetooth Management Center object
132
+ * @return IDOBluetoothManager
133
+ */
134
+ + (__kindof IDOBluetoothManager *)shareInstance;
135
+
136
+ /**
137
+ * @brief 初始化系统蓝牙管理中心对象并刷新蓝牙代理
138
+ * Initializes the system bluetooth management center object and refreshes the bluetooth delegate
139
+ */
140
+ + (void)refreshDelegate;
141
+
142
+ /**
143
+ 开始扫描 | Start scanning
144
+ */
145
+ + (void)startScan;
146
+
147
+ /**
148
+ 停止扫描 | Stop scanning
149
+ */
150
+ + (void)stopScan;
151
+
152
+ /**
153
+ * @brief 1、普通模式下选择外围设备连接 2、ota模式下选择外围设备连接
154
+ * 1. Select peripheral device connection in normal mode
155
+ * 2. Select peripheral device connection in ota mode
156
+ * @param model IDOPeripheralModel 对象 | IDOPeripheralModel object
157
+ */
158
+ + (void)connectDeviceWithModel:(IDOPeripheralModel *)model;
159
+
160
+ /**
161
+ 断开当前外围设备的连接 | Disconnect the current peripheral device
162
+ */
163
+ + (void)cancelCurrentPeripheralConnection;
164
+
165
+ @end
166
+
@@ -0,0 +1,75 @@
1
+ //
2
+ // IDOBluetoothServices.h
3
+ // VeryfitSDK
4
+ //
5
+ // Created by apple on 2018/8/22.
6
+ // Copyright © 2018年 hedongyang. All rights reserved.
7
+ //
8
+
9
+ #import <Foundation/Foundation.h>
10
+ #if __has_include(<IDOBluetoothInternal/IDOBluetoothInternal.h>)
11
+ #elif __has_include(<IDOBlueProtocol/IDOBlueProtocol.h>)
12
+ #else
13
+ #import "IDOGetInfoBluetoothModel.h"
14
+ #endif
15
+
16
+ // 蓝牙扫描、连接状态通知监听名字 | Bluetooth scan, connection status notification listener name
17
+ extern NSString * _Nonnull IDOBluetoothConnectStateNotifyName;
18
+
19
+ // 蓝牙扫描、连接过程错误通知监听名字 | Bluetooth scan, connection process error notification listener name
20
+ extern NSString * _Nonnull IDOBluetoothConnectErrorNotifyName;
21
+
22
+ // 蓝牙主动断开通知监听名字,多在配对和固件升级使用 | Bluetooth disconnect notification listener name
23
+ extern NSString * _Nonnull IDOBluetoothDisconnectNotifyName;
24
+
25
+ // 蓝牙主动开始扫描通知监听名字,多在配对和固件升级使用 | Bluetooth start scan notification listener name
26
+ extern NSString * _Nonnull IDOBluetoothStartScanNotifyName;
27
+
28
+ // 蓝牙主动停止扫描通知监听名字,多在配对和固件升级使用 | Bluetooth stop scan notification listener name
29
+ extern NSString * _Nonnull IDOBluetoothStopScanNotifyName;
30
+
31
+ // 当前连接的手环设备为OTA模式通知监听名字 | The currently connected bracelet device is OTA mode notification listener name
32
+ extern NSString * _Nonnull IDOBluetoothOtaModeNotifyName;
33
+
34
+ // 蓝牙日志打开记录通知名字 | Bluetooth log opens record notification name
35
+ extern NSString * _Nonnull IDOBluetoothOpenLogRecordNotifyName;
36
+
37
+ // 数据迁移状态通知名字 | Data migration status notification name
38
+ extern NSString * _Nonnull IDOBluetoothDataMigrationNotifyName;
39
+
40
+ @interface IDOBluetoothServices : NSObject
41
+
42
+ /*
43
+ 是否输出蓝牙sdk运行日志 | Whether to output the Bluetooth sdk running log
44
+ */
45
+ @property (nonatomic,copy,nullable) IDOBluetoothServices *_Nonnull(^outputSdkLog)(BOOL isOutput);
46
+
47
+ /*
48
+ 是否输出蓝牙协议运行日志 | Whether to output the Bluetooth protocol running log
49
+ */
50
+ @property (nonatomic,copy,nullable) IDOBluetoothServices *_Nonnull(^outputProtocolLog)(BOOL isOutput);
51
+
52
+ /*
53
+ 是否记录原始数据日志 | Whether to log raw data
54
+ */
55
+ @property (nonatomic,copy,nullable) IDOBluetoothServices *_Nonnull(^rawDataLog)(BOOL isRecord);
56
+
57
+ /*
58
+ 是否添加阿里云日志 默认 No | Add Alibaba Cloud Log Default No
59
+ */
60
+ @property (nonatomic,copy,nullable) IDOBluetoothServices *_Nonnull(^addAliYunLog)(BOOL isAdd);
61
+
62
+ /**
63
+ * 注册SDK服务后,初始化设备信息并返回,需开始启动蓝牙,根据各自业务需求,可以选择自己的APP创建蓝牙管理,也可以使用我们提供的库创建蓝牙管理.
64
+ * After the SDK service is registered, the device information is initialized and returned, and bluetooth needs to be started.
65
+ * According to their business needs, they can choose their own APP to create bluetooth management, or they can use the library we provide to create bluetooth management.
66
+ */
67
+ @property (nonatomic,copy,nullable) void(^startScanBule)(void(^ _Nullable getDeviceInfoBlock)(IDOGetDeviceInfoBluetoothModel * _Nullable model));
68
+
69
+ /**
70
+ * @brief 注册SDK服务,初始化设备信息 | Register for SDK service,initializes device info
71
+ * @return IDOBluetoothServices
72
+ */
73
+ IDOBluetoothServices * _Nonnull registrationServices(void);
74
+
75
+ @end