| 1.0.0 | 初始版本 | 梁振营 | 2024-03-8 |\r
| 1.0.1 | 鼠标按键指令修改 | 梁振营 | 2024-03-18 |\r
| 1.0.2 | 鉴权流程修改,只有鉴权成功了,SDK相关功能才可以使用 | 梁振营 | 2024-03-19 |\r
-| 1.0.3 | 支持USB通讯 | 梁振营 | 2024-04-01 |\r
+| 1.0.3 | 按键指令修改 | 梁振营 | 2024-03-20 |\r
+| 1.0.4 | 支持USB通讯 | 梁振营 | 2024-04-01 |\r
\r
\r
\r
+++ /dev/null
-//
-// ViewController.m
-// MouseSdk
-//
-// Created by incar on 2024/2/18.
-//
-
-#import "ViewController.h"
-#import "ScanVC.h"
-#import "BleManager.h"
-
-
-@interface ViewController ()
-
-@property(nonatomic,strong)NSTextField *connectLabel;
-@property(nonatomic,strong)NSTextField *autoLabel;
-@end
-
-@implementation ViewController
-
-- (void)viewDidLoad {
- [super viewDidLoad];
-
- // Do any additional setup after loading the view.
- [self setupUI];
- [self setupNotification];
- [self setupBleManger];
-}
-
-- (void)setRepresentedObject:(id)representedObject {
- [super setRepresentedObject:representedObject];
-
- // Update the view, if already loaded.
-}
-
-- (void)setupUI{
- self.title = @"AI SDK";
-
- {
- NSButton *btn = [[NSButton alloc]initWithFrame:NSMakeRect(100, self.view.bounds.size.height - 100, 100, 45)];
- btn.bordered = true;
- btn.title = @"扫描";
- [btn setTarget:self];
- [btn setAction:@selector(scanAction)];
- btn.state = 1;
- [self.view addSubview:btn];
- }
- {
- NSTextField *label = [[NSTextField alloc] initWithFrame:CGRectMake(230, self.view.bounds.size.height - 120, 200, 35)];
- label.editable = NO;
- label.bordered = NO;
- label.stringValue = @"连接状态:未连接";
- label.backgroundColor = NSColor.clearColor;
- self.connectLabel = label;
- [self.view addSubview:label];
- }
- {
- NSTextField *label = [[NSTextField alloc] initWithFrame:CGRectMake(230, self.view.bounds.size.height - 200, 200, 35)];
- label.editable = NO;
- label.bordered = NO;
- label.stringValue = @"鉴权状态:unknow";
- label.backgroundColor = NSColor.clearColor;
- self.autoLabel = label;
- [self.view addSubview:label];
- }
- {
- NSButton *btn = [[NSButton alloc]initWithFrame:NSMakeRect(100, self.view.bounds.size.height - 200, 100, 45)];
- btn.bordered = true;
- btn.title = @"获取设备信息";
- [btn setTarget:self];
- [btn setAction:@selector(getDeviceInfoAction)];
- btn.state = 1;
- [self.view addSubview:btn];
- }
-}
-- (void)setupBleManger{
- BleManager *manager = [BleManager shared];
- __weak typeof(self) ws = self;
- manager.authCallBack = ^(BOOL isSuccess) {
- [ws showAuthResult:isSuccess];
- };
-}
-
-- (void)scanAction{
- ScanVC *vc = [[ScanVC alloc] initWithNibName:nil bundle:nil];
- [self presentViewControllerAsModalWindow:vc];
-}
-
-- (void)getDeviceInfoAction{
- [[BleManager shared] getDeviceInfo:^(AiMouseDeviceInfo *deviceInfo, NSError *error) {
- if (deviceInfo) {
- NSLog(@"battery_power = %@,CPI = %@,CPI_list = %@,version = %@,brand = %@,sn = %@,mac = %@,",deviceInfo.battery_power,deviceInfo.CPI,deviceInfo.CPI_list,deviceInfo.version,deviceInfo.brand,deviceInfo.sn,deviceInfo.mac);
- }
- else{
- NSLog(@"get deivce info error == %@",error.description);
- }
- }];
-}
-
-- (void)showAuthResult:(BOOL)isSuccess{
- dispatch_async(dispatch_get_main_queue(), ^{
- self.autoLabel.stringValue = isSuccess?@"鉴权状态:鉴权成功":@"鉴权状态:鉴权失败";
- });
-}
-
-#pragma mark - notication
-- (void)setupNotification{
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(bleDidConnect:) name:kDidConnectBleNotification object:nil];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(bleDidDisconnect:) name:kDidDisconnectBleNotification object:nil];
-}
-
-- (void)bleDidConnect:(NSNotification *)notification{
- self.connectLabel.stringValue = @"连接状态:已连接";
-}
-- (void)bleDidDisconnect:(NSNotification *)notification{
- self.connectLabel.stringValue = @"连接状态:未连接";
-}
-@end
/* Begin PBXBuildFile section */
18AE9D3B2B9AFE7800743515 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 18AE9D3A2B9AFE7800743515 /* AppDelegate.m */; };
- 18AE9D3E2B9AFE7800743515 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18AE9D3D2B9AFE7800743515 /* ViewController.m */; };
18AE9D402B9AFE7B00743515 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 18AE9D3F2B9AFE7B00743515 /* Assets.xcassets */; };
18AE9D432B9AFE7B00743515 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 18AE9D412B9AFE7B00743515 /* Main.storyboard */; };
18AE9D452B9AFE7B00743515 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 18AE9D442B9AFE7B00743515 /* main.m */; };
18AE9D502B9AFE7C00743515 /* MouseSdkDemoTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 18AE9D4F2B9AFE7C00743515 /* MouseSdkDemoTests.m */; };
18AE9D5A2B9AFE7C00743515 /* MouseSdkDemoUITests.m in Sources */ = {isa = PBXBuildFile; fileRef = 18AE9D592B9AFE7C00743515 /* MouseSdkDemoUITests.m */; };
18AE9D5C2B9AFE7C00743515 /* MouseSdkDemoUITestsLaunchTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 18AE9D5B2B9AFE7C00743515 /* MouseSdkDemoUITestsLaunchTests.m */; };
- 18AE9D7B2B9B02BC00743515 /* BleManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 18AE9D732B9B02BB00743515 /* BleManager.m */; };
18AE9D7C2B9B02BC00743515 /* ScanVC.m in Sources */ = {isa = PBXBuildFile; fileRef = 18AE9D762B9B02BC00743515 /* ScanVC.m */; };
18AE9D7D2B9B02BC00743515 /* ScanCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 18AE9D772B9B02BC00743515 /* ScanCell.m */; };
18AE9D7E2B9B02BC00743515 /* Config.m in Sources */ = {isa = PBXBuildFile; fileRef = 18AE9D7A2B9B02BC00743515 /* Config.m */; };
18BF8F302BA7D45B008F6933 /* AiMouseSdk.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 18BF8F2B2BA7D456008F6933 /* AiMouseSdk.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
18BF8F312BA7D45D008F6933 /* AliIotConnectKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 18BF8F2C2BA7D456008F6933 /* AliIotConnectKit.framework */; };
18BF8F322BA7D45D008F6933 /* AliIotConnectKit.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 18BF8F2C2BA7D456008F6933 /* AliIotConnectKit.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
+ 18C31D7A2BBABFD30089D656 /* DeviceManger.m in Sources */ = {isa = PBXBuildFile; fileRef = 18C31D722BBABFD20089D656 /* DeviceManger.m */; };
+ 18C31D7B2BBABFD30089D656 /* HidManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 18C31D742BBABFD30089D656 /* HidManager.m */; };
+ 18C31D7C2BBABFD30089D656 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 18C31D762BBABFD30089D656 /* ViewController.m */; };
+ 18C31D7D2BBABFD30089D656 /* BleManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 18C31D772BBABFD30089D656 /* BleManager.m */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
18AE9D362B9AFE7800743515 /* MouseSdkDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = MouseSdkDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
18AE9D392B9AFE7800743515 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
18AE9D3A2B9AFE7800743515 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
- 18AE9D3C2B9AFE7800743515 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
- 18AE9D3D2B9AFE7800743515 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
18AE9D3F2B9AFE7B00743515 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
18AE9D422B9AFE7B00743515 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
18AE9D442B9AFE7B00743515 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
18AE9D552B9AFE7C00743515 /* MouseSdkDemoUITests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = MouseSdkDemoUITests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
18AE9D592B9AFE7C00743515 /* MouseSdkDemoUITests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MouseSdkDemoUITests.m; sourceTree = "<group>"; };
18AE9D5B2B9AFE7C00743515 /* MouseSdkDemoUITestsLaunchTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = MouseSdkDemoUITestsLaunchTests.m; sourceTree = "<group>"; };
- 18AE9D732B9B02BB00743515 /* BleManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BleManager.m; sourceTree = "<group>"; };
18AE9D742B9B02BB00743515 /* Config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Config.h; sourceTree = "<group>"; };
18AE9D752B9B02BC00743515 /* ScanCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScanCell.h; sourceTree = "<group>"; };
18AE9D762B9B02BC00743515 /* ScanVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScanVC.m; sourceTree = "<group>"; };
18AE9D772B9B02BC00743515 /* ScanCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScanCell.m; sourceTree = "<group>"; };
- 18AE9D782B9B02BC00743515 /* BleManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BleManager.h; sourceTree = "<group>"; };
18AE9D792B9B02BC00743515 /* ScanVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScanVC.h; sourceTree = "<group>"; };
18AE9D7A2B9B02BC00743515 /* Config.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Config.m; sourceTree = "<group>"; };
18BF8F2B2BA7D456008F6933 /* AiMouseSdk.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AiMouseSdk.framework; sourceTree = "<group>"; };
18BF8F2C2BA7D456008F6933 /* AliIotConnectKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = AliIotConnectKit.framework; sourceTree = "<group>"; };
+ 18C31D722BBABFD20089D656 /* DeviceManger.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DeviceManger.m; sourceTree = "<group>"; };
+ 18C31D732BBABFD20089D656 /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
+ 18C31D742BBABFD30089D656 /* HidManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HidManager.m; sourceTree = "<group>"; };
+ 18C31D752BBABFD30089D656 /* BleManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BleManager.h; sourceTree = "<group>"; };
+ 18C31D762BBABFD30089D656 /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
+ 18C31D772BBABFD30089D656 /* BleManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BleManager.m; sourceTree = "<group>"; };
+ 18C31D782BBABFD30089D656 /* HidManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HidManager.h; sourceTree = "<group>"; };
+ 18C31D792BBABFD30089D656 /* DeviceManger.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DeviceManger.h; sourceTree = "<group>"; };
+ 18C31D7E2BBABFFA0089D656 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
18AE9D382B9AFE7800743515 /* MouseSdkDemo */ = {
isa = PBXGroup;
children = (
+ 18C31D7E2BBABFFA0089D656 /* Info.plist */,
18AE9D392B9AFE7800743515 /* AppDelegate.h */,
18AE9D3A2B9AFE7800743515 /* AppDelegate.m */,
- 18AE9D3C2B9AFE7800743515 /* ViewController.h */,
- 18AE9D3D2B9AFE7800743515 /* ViewController.m */,
- 18AE9D782B9B02BC00743515 /* BleManager.h */,
- 18AE9D732B9B02BB00743515 /* BleManager.m */,
18AE9D742B9B02BB00743515 /* Config.h */,
18AE9D7A2B9B02BC00743515 /* Config.m */,
+ 18C31D752BBABFD30089D656 /* BleManager.h */,
+ 18C31D772BBABFD30089D656 /* BleManager.m */,
+ 18C31D792BBABFD30089D656 /* DeviceManger.h */,
+ 18C31D722BBABFD20089D656 /* DeviceManger.m */,
+ 18C31D782BBABFD30089D656 /* HidManager.h */,
+ 18C31D742BBABFD30089D656 /* HidManager.m */,
+ 18C31D732BBABFD20089D656 /* ViewController.h */,
+ 18C31D762BBABFD30089D656 /* ViewController.m */,
18AE9D752B9B02BC00743515 /* ScanCell.h */,
18AE9D772B9B02BC00743515 /* ScanCell.m */,
18AE9D792B9B02BC00743515 /* ScanVC.h */,
buildActionMask = 2147483647;
files = (
18AE9D7E2B9B02BC00743515 /* Config.m in Sources */,
- 18AE9D3E2B9AFE7800743515 /* ViewController.m in Sources */,
- 18AE9D7B2B9B02BC00743515 /* BleManager.m in Sources */,
+ 18C31D7A2BBABFD30089D656 /* DeviceManger.m in Sources */,
+ 18C31D7D2BBABFD30089D656 /* BleManager.m in Sources */,
+ 18C31D7C2BBABFD30089D656 /* ViewController.m in Sources */,
18AE9D452B9AFE7B00743515 /* main.m in Sources */,
+ 18C31D7B2BBABFD30089D656 /* HidManager.m in Sources */,
18AE9D7C2B9B02BC00743515 /* ScanVC.m in Sources */,
18AE9D7D2B9B02BC00743515 /* ScanCell.m in Sources */,
18AE9D3B2B9AFE7800743515 /* AppDelegate.m in Sources */,
"$(PROJECT_DIR)/framework",
);
GENERATE_INFOPLIST_FILE = YES;
+ INFOPLIST_FILE = MouseSdkDemo/Info.plist;
INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "要打开蓝牙功能哦,才能继续使用APP";
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INFOPLIST_KEY_NSMainStoryboardFile = Main;
+ INFOPLIST_KEY_NSMicrophoneUsageDescription = "要打开麦克风才能使用AI功能哦";
INFOPLIST_KEY_NSPrincipalClass = NSApplication;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"$(PROJECT_DIR)/framework",
);
GENERATE_INFOPLIST_FILE = YES;
+ INFOPLIST_FILE = MouseSdkDemo/Info.plist;
INFOPLIST_KEY_NSBluetoothAlwaysUsageDescription = "要打开蓝牙功能哦,才能继续使用APP";
INFOPLIST_KEY_NSHumanReadableCopyright = "";
INFOPLIST_KEY_NSMainStoryboardFile = Main;
+ INFOPLIST_KEY_NSMicrophoneUsageDescription = "要打开麦克风才能使用AI功能哦";
INFOPLIST_KEY_NSPrincipalClass = NSApplication;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
@interface BleManager : NSObject
@property (nonatomic,strong)void (^discoverDevice)(CBPeripheral *peripheral) ;/// 扫描到设备
@property (nonatomic,strong)void (^didConnectDevice)(CBPeripheral *peripheral);/// 连接成功
+@property (nonatomic,strong)void (^didDisConnectDevice)(CBPeripheral *peripheral);/// 断开连接
@property (nonatomic,strong)void (^authCallBack)(BOOL isSuccess);/// 鉴权回调
-
+/// 单利
+(BleManager *)shared;
/// 扫描
self = [super init];
if (self) {
self.centralManager = [[CBCentralManager alloc]initWithDelegate:self queue:nil];
- [AiMouse shared].delegate = self;
}
return self;
}
#pragma mark - CBCentralManagerDelegate
- (void)centralManagerDidUpdateState:(nonnull CBCentralManager *)central {
- [self showLog:[NSString stringWithFormat:@"设å¤\87状态 = %@",@(central.state)]];
+ [self showLog:[NSString stringWithFormat:@"è\93\9dç\89\99状态 = %@",@(central.state)]];
switch (central.state) {
case CBManagerStateUnknown:
-(void)centralManager:(CBCentralManager *)central didDisconnectPeripheral:(CBPeripheral *)peripheral error:(NSError *)error{
[self showLog:[NSString stringWithFormat:@"断开连接。。。%@",error.description]];
[[NSNotificationCenter defaultCenter] postNotificationName:kDidDisconnectBleNotification object:nil];
-
+ if(self.didDisConnectDevice){
+ self.didDisConnectDevice(peripheral);
+ }
[self autoConnectDevice];
}
- (void)centralManager:(CBCentralManager *)central didFailToConnectPeripheral:(CBPeripheral *)peripheral error:(nullable NSError *)error{
//鉴权特征
self.authCha = characteristic;
[peripheral setNotifyValue:YES forCharacteristic:characteristic];
+ //切换代理
+ [AiMouse shared].delegate = self;
+ //切换当前连接类型
+ [[AiMouse shared] switchConnect:AiMouseConnectType_bluetooth];
//找到鉴权特征后,一定要调用鉴权接口开始鉴权。只有鉴权通过了,sdk相关功能才可以使用
[[AiMouse shared] startAuthentication:^(AiMouseAuthState state) {
[self showLog:[NSString stringWithFormat:@"鉴权结果 = %@",@(state)]];
/// 鼠标按键指令回调
/// - Parameter data: 数据。
-/// M 键 短按0x42;长按按下(开始录音)0x25, 长按抬起(结束录音) 0x26;
-/// AI键 短按0x43 ,长按按下(开始录音)0x27, 长按抬起(结束录音) 0x28;
-/// 语音键 按下(开始录音) 0x31,弹起(结束录音)0x32;
+/// 前 第一次单击31(开始录音), 第二次单击32(结束录音) , 按下21(开始录音)抬起22(结束录音)
+/// 中 单击42, 按下25(开始录音)抬起26(结束录音)
+/// 后 单击43,按下27(开始录音)抬起28(结束录音)
/// 其他未定义
- (void)aiMouseSendCmdData:(NSData *)data{
uint8 cmd;
[data getBytes:&cmd length:1];
- if(cmd == 0x25){
- [self showLog:@"M键开始录音"];
- self.recordData = [[NSMutableData alloc] init];
- }
- else if(cmd == 0x26){
- [self showLog:@"M键结束录音"];
- [self finishRecored:self.recordData];
- }
- else if(cmd == 0x27){
- [self showLog:@"AI键开始录音"];
- self.recordData = [[NSMutableData alloc] init];
- }
- else if(cmd == 0x28){
- [self showLog:@"AI键结束录音"];
- [self finishRecored:self.recordData];
- }
- else if(cmd == 0x31){
- [self showLog:@"语音键开始录音"];
+ [self showLog:[NSString stringWithFormat:@"收到指令 = %X",cmd]];
+
+ if(cmd == 0x31 || cmd == 0x21 || cmd == 0x25 ||cmd == 0x27){
+ [self showLog:@"开始录音"];
self.recordData = [[NSMutableData alloc] init];
}
- else if(cmd == 0x32){
- [self showLog:@"语音键结束录音"];
+ else if(cmd == 0x32 || cmd == 0x22 || cmd == 0x26 ||cmd == 0x28){
+ [self showLog:@"结束录音"];
[self finishRecored:self.recordData];
}
- else{
- [self showLog:@"未定义指令!!!!!!!!"];
- }
}
+
/// 录音回调
/// - Parameter data: pcm格式语音数据
- (void)aiMouseSendRecordData:(NSData *)data{
--- /dev/null
+//
+// DeviceManger.h
+// MouseSdk
+//
+// Created by incar on 2024/3/30.
+//
+
+#import <Foundation/Foundation.h>
+#import <AiMouseSdk/AiMouseSdk.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface DeviceManger : NSObject
+@property (nonatomic, readonly) AiMouseConnectType connectType;//连接类型
+@property (nonatomic,strong)void (^authCallBack)(BOOL isSuccess);/// 鉴权回调
+@property (nonatomic,strong)void (^connectStateCallBack)(AiMouseConnectType connectType,BOOL isConnect);///是否连接成功
+
++(DeviceManger *)shared;
+
+/// 切换连接类型
+/// - Parameter type: 连接类型
+- (void)switchConnect:(AiMouseConnectType)type;
+
+/// 获取设备信息
+- (void)getDeviceInfo:(void (^)(AiMouseDeviceInfo *deviceInfo,NSError *error))completation;
+
+-(void)startAuthentication;
+
+@end
+
+NS_ASSUME_NONNULL_END
--- /dev/null
+//
+// DeviceManger.m
+// MouseSdk
+//
+// Created by incar on 2024/3/30.
+//
+
+#import "DeviceManger.h"
+#import "HidManager.h"
+#import "BleManager.h"
+
+@interface DeviceManger()
+
+@property (nonatomic,strong) BleManager *ble;
+@property (nonatomic,strong) HidManager *hid;
+@end
+
+@implementation DeviceManger
++(DeviceManger *)shared{
+ static DeviceManger *manager = nil;
+ static dispatch_once_t oncePredicate;
+ dispatch_once(&oncePredicate, ^{
+ manager = [[DeviceManger alloc]init];
+ });
+ return manager;
+}
+
+- (instancetype)init{
+ self = [super init];
+ if (self) {
+ [self setupBle];
+ [self setupHid];
+ }
+ return self;
+}
+
+-(AiMouseConnectType)connectType{
+ return [AiMouse shared].connectType;
+}
+
+- (void)switchConnect:(AiMouseConnectType)type{
+ [[AiMouse shared] switchConnect:type];
+
+ if ([AiMouse shared].connectType == AiMouseConnectType_bluetooth) {
+ [self setupBle];
+ }
+ else{
+ [self setupHid];
+ }
+}
+
+- (void)setupHid{
+ self.ble = [BleManager shared];
+ __weak typeof(self) ws = self;
+ self.ble.authCallBack = ^(BOOL isSuccess) {
+ if(ws.authCallBack)ws.authCallBack(isSuccess);
+ };
+ self.ble.didConnectDevice = ^(CBPeripheral *peripheral) {
+ if(ws.connectStateCallBack)ws.connectStateCallBack(AiMouseConnectType_bluetooth,true);
+ };
+ self.ble.didDisConnectDevice = ^(CBPeripheral *peripheral) {
+ if(ws.connectStateCallBack)ws.connectStateCallBack(AiMouseConnectType_bluetooth,false);
+ };
+}
+
+- (void)setupBle{
+ self.hid = [HidManager shared];
+ __weak typeof(self) ws = self;
+ self.hid.authCallBack = ^(BOOL isSuccess) {
+ if(ws.authCallBack)ws.authCallBack(isSuccess);
+ };
+ self.hid.connectStateCallBack = ^(BOOL isConnnect) {
+ if(ws.connectStateCallBack)ws.connectStateCallBack(AiMouseConnectType_hid,isConnnect);
+ };
+ [self setupBleNotification];
+}
+
+- (void)getDeviceInfo:(void (^)(AiMouseDeviceInfo *deviceInfo,NSError *error))completation{
+ if ([AiMouse shared].connectType == AiMouseConnectType_bluetooth) {
+ [self.ble getDeviceInfo:completation];
+ }
+ else{
+ [self.hid getDeviceInfo:completation];
+ }
+}
+
+
+#pragma mark - notication
+- (void)setupBleNotification{
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(bleDidConnect:) name:kDidConnectBleNotification object:nil];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(bleDidDisconnect:) name:kDidDisconnectBleNotification object:nil];
+}
+
+- (void)bleDidConnect:(NSNotification *)notification{
+ if(self.connectStateCallBack)self.connectStateCallBack(AiMouseConnectType_bluetooth,true);
+}
+
+- (void)bleDidDisconnect:(NSNotification *)notification{
+ if(self.connectStateCallBack)self.connectStateCallBack(AiMouseConnectType_bluetooth,false);
+ [[AiMouse shared] switchConnect:AiMouseConnectType_hid];
+}
+
+-(void)startAuthentication{
+ [self.hid startAuthentication];
+}
+@end
--- /dev/null
+//
+// HidManager.h
+// MouseSdk
+//
+// Created by incar on 2024/3/26.
+//
+
+#import <Foundation/Foundation.h>
+#import <AiMouseSdk/AiMouseDeviceInfo.h>
+
+NS_ASSUME_NONNULL_BEGIN
+
+@interface HidManager : NSObject
+@property (nonatomic,strong)void (^connectStateCallBack)(BOOL isConnnect);/// 设备是否连上
+@property (nonatomic,strong)void (^authCallBack)(BOOL isSuccess);/// 鉴权回调
+
++(HidManager *)shared;
+
+/// 获取设备信息
+- (void)getDeviceInfo:(void (^)(AiMouseDeviceInfo *deviceInfo,NSError *error))completation;
+
+
+/// 鉴权
+-(void)startAuthentication;
+@end
+
+NS_ASSUME_NONNULL_END
--- /dev/null
+//
+// HidManager.m
+// MouseSdk
+//
+// Created by incar on 2024/3/26.
+//
+
+#import "HidManager.h"
+#include <IOKit/hid/IOHIDLib.h>
+#include <IOKit/hid/IOHIDKeys.h>
+#import <AiMouseSdk/AiMouseSdk.h>
+#import "Config.h"
+
+//供应商id
+const long vendorID = 0x248a;
+//产品id
+const long productID = 0xca08;
+
+@interface HidManager ()<AiMouseDelegate>
+
+@property(nonatomic, assign) IOHIDManagerRef hidManager;///hid管理
+@property(nonatomic, assign) IOHIDDeviceRef authCha;//鉴权通道
+@property(nonatomic, assign) IOHIDDeviceRef aiCha;//ai通道
+@property(nonatomic, assign) IOHIDDeviceRef deviceInfoCha;//设备信息通道
+@property (nonatomic,strong) NSMutableData *recordData;//录音的数据
+@end
+
+@implementation HidManager
++(HidManager *)shared{
+ static HidManager *manager = nil;
+ static dispatch_once_t oncePredicate;
+ dispatch_once(&oncePredicate, ^{
+ manager = [[HidManager alloc]init];
+ });
+ return manager;
+}
+
+- (instancetype)init{
+ self = [super init];
+ if (self) {
+ [self initHid];
+ [self open];
+ }
+ return self;
+}
+
+- (void)initHid{
+
+}
+
+- (void)open{
+ self.hidManager = IOHIDManagerCreate(kCFAllocatorDefault, kIOHIDOptionsTypeNone);
+ IOHIDManagerScheduleWithRunLoop(self.hidManager, CFRunLoopGetMain(), kCFRunLoopDefaultMode);
+ IOReturn ret = IOHIDManagerOpen(self.hidManager, 0L);
+ if (ret != kIOReturnSuccess) {
+ NSLog(@"打开设备失败!");
+ }else{
+ NSLog(@"打开设备成功!");
+ }
+ //设置匹配设备
+ NSMutableDictionary* dict= [NSMutableDictionary dictionary];
+ [dict setValue:[NSNumber numberWithLong:productID] forKey:[NSString stringWithCString:kIOHIDProductIDKey encoding:NSUTF8StringEncoding]];
+ [dict setValue:[NSNumber numberWithLong:vendorID] forKey:[NSString stringWithCString:kIOHIDVendorIDKey encoding:NSUTF8StringEncoding]];
+ IOHIDManagerSetDeviceMatching(self.hidManager, (__bridge CFMutableDictionaryRef)dict);
+ //设置匹配到设备回调
+ IOHIDManagerRegisterDeviceMatchingCallback(self.hidManager, &hidAppearDevice, NULL);
+ //设置移除设备回调
+ IOHIDManagerRegisterDeviceRemovalCallback(self.hidManager, &hidDisAppearDevice, NULL);
+}
+
+- (void)close{
+ IOReturn ret = IOHIDManagerClose(self.hidManager, 0);
+ if (ret != kIOReturnSuccess) {
+ NSLog(@"关闭设备失败!");
+ }else{
+ NSLog(@"关闭设备成功!");
+ }
+}
+
+#pragma mark - Hid CallBack
+/// 匹配到设备回调
+static void hidAppearDevice(void *inContext,IOReturn inResult,void *inSender,IOHIDDeviceRef inIOHIDDeviceRef) {
+ uint32_t vid = IOHIDDevGetUInt32Property(inIOHIDDeviceRef, CFSTR(kIOHIDVendorIDKey));
+ uint32_t pid = IOHIDDevGetUInt32Property(inIOHIDDeviceRef, CFSTR(kIOHIDProductIDKey));
+ uint32_t PrimaryUsagePage = IOHIDDevGetUInt32Property(inIOHIDDeviceRef, CFSTR(kIOHIDPrimaryUsagePageKey));
+ uint32_t PrimaryUsage = IOHIDDevGetUInt32Property(inIOHIDDeviceRef, CFSTR(kIOHIDPrimaryUsageKey));
+ NSLog(@"vid = %u, pid = %u, PrimaryUsagePage = %u, PrimaryUsage = %u,",vid,pid,PrimaryUsagePage,PrimaryUsage);
+ NSLog(@"发现设备 %@\n ",inIOHIDDeviceRef);
+
+ // PrimaryUsagePage=1 PrimaryUsage=0,设备信息
+ // PrimaryUsagePage=1 PrimaryUsage=6,鉴权
+ // PrimaryUsagePage=65283 PrimaryUsage=0,ai
+ if(PrimaryUsagePage == 1 && PrimaryUsage == 0){
+ //设备信息
+ [HidManager shared].deviceInfoCha = inIOHIDDeviceRef;
+ //鉴权
+ [HidManager shared].authCha = inIOHIDDeviceRef;
+ //开始鉴权
+ [[HidManager shared] startAuthentication];
+ }
+ else if(PrimaryUsagePage == 65283 && PrimaryUsage == 0){
+ //ai
+ [HidManager shared].aiCha = inIOHIDDeviceRef;
+ }
+ //注册消息回调
+ unsigned char InputBuffer[128];
+ IOHIDDeviceRegisterInputReportCallback(inIOHIDDeviceRef, InputBuffer, sizeof(InputBuffer), hidReceiveData, NULL);
+}
+
+/// 设备移除回调
+static void hidDisAppearDevice(void *inContext,IOReturn inResult,void *inSender,IOHIDDeviceRef inIOHIDDeviceRef) {
+ NSLog(@"拔出设备 %@ ",inIOHIDDeviceRef);
+ uint32_t PrimaryUsagePage = IOHIDDevGetUInt32Property(inIOHIDDeviceRef, CFSTR(kIOHIDPrimaryUsagePageKey));
+ uint32_t PrimaryUsage = IOHIDDevGetUInt32Property(inIOHIDDeviceRef, CFSTR(kIOHIDPrimaryUsageKey));
+
+ if(PrimaryUsagePage == 1 && PrimaryUsage == 0){
+ [HidManager shared].connectStateCallBack(false);
+ }
+}
+
+static void hidReceiveData(void* context, IOReturn result, void* sender, IOHIDReportType type, uint32_t reportID, uint8_t *report,CFIndex reportLength){
+
+ [[HidManager shared] showLog:[NSString stringWithFormat:@"[receive] 处理前 %@",[AiMouseTools dataToHexString:[[NSData alloc] initWithBytes:report length:reportLength]]]];
+
+ NSInteger len = get_data_len(report, reportLength);
+ NSData *data = [[NSData alloc] initWithBytes:report length:len];
+ [[HidManager shared] showLog:[NSString stringWithFormat:@"[receive] 处理后 %@",[AiMouseTools dataToHexString:data]]];
+
+ uint32_t PrimaryUsagePage = IOHIDDevGetUInt32Property(sender, CFSTR(kIOHIDPrimaryUsagePageKey));
+ uint32_t PrimaryUsage = IOHIDDevGetUInt32Property(sender, CFSTR(kIOHIDPrimaryUsageKey));
+
+ if(PrimaryUsagePage == 1 && PrimaryUsage == 0){
+ [[HidManager shared] showLog:@"device数据"];
+ [[AiMouse shared] sendDeviceDataToSdk:data];
+ }
+ else if(PrimaryUsagePage == 65283 && PrimaryUsage == 0){
+ [[HidManager shared] showLog:@"AI数据"];
+ [[AiMouse shared] sendAiDataToSdk:data];
+ }
+}
+#pragma mark - AiDelegate
+/// 鉴权数据回调,需要将此数据转发给蓝牙设备
+/// - Parameter data: 数据
+- (void)aiMouseSendAuthData:(NSData *)data{
+ [self sendData:data toDevice:self.authCha];
+}
+
+/// 设备信息数据回调,需要将此数据通过设备信息特征转发给蓝牙设备
+/// - Parameter data: 数据
+-(void)aiMouseSendDeviceInfoData:(NSData *)data{
+ [self sendData:data toDevice:self.deviceInfoCha];
+}
+
+/// 鼠标按键指令回调
+/// - Parameter data: 数据。
+/// 前 第一次单击31(开始录音), 第二次单击32(结束录音) , 按下21(开始录音)抬起22(结束录音)
+/// 中 单击42, 按下25(开始录音)抬起26(结束录音)
+/// 后 单击43,按下27(开始录音)抬起28(结束录音)
+/// 其他未定义
+- (void)aiMouseSendCmdData:(NSData *)data{
+ uint8 cmd;
+ [data getBytes:&cmd length:1];
+ [self showLog:[NSString stringWithFormat:@"收到指令 = %X",cmd]];
+
+ if(cmd == 0x31 || cmd == 0x21 || cmd == 0x25 ||cmd == 0x27){
+ [self showLog:@"开始录音"];
+ self.recordData = [[NSMutableData alloc] init];
+ }
+ else if(cmd == 0x32 || cmd == 0x22 || cmd == 0x26 ||cmd == 0x28){
+ [self showLog:@"结束录音"];
+ [self finishRecored:self.recordData];
+ }
+}
+/// 录音回调
+/// - Parameter data: pcm格式语音数据
+- (void)aiMouseSendRecordData:(NSData *)data{
+ [self.recordData appendData:data];
+}
+
+#pragma mark - public
+-(void)startAuthentication{
+ //连上设备
+ [HidManager shared].connectStateCallBack(true);
+ //设置代理
+ [AiMouse shared].delegate = self;
+ //切换当前连接类型
+ [[AiMouse shared] switchConnect:AiMouseConnectType_hid];
+ //找到鉴权特征后,一定要调用鉴权接口开始鉴权。只有鉴权通过了,sdk相关功能才可以使用
+ [self showLog:@"开始鉴权"];
+ [[AiMouse shared] startAuthentication:^(AiMouseAuthState state) {
+ [self showLog:[NSString stringWithFormat:@"鉴权结果 = %@",@(state)]];
+ if(self.authCallBack){
+ self.authCallBack(state == AiMouseAuthState_Success);
+ }
+ }];
+}
+/// 获取设备信息
+- (void)getDeviceInfo:(void (^)(AiMouseDeviceInfo * _Nonnull, NSError * _Nonnull))completation{
+ [[AiMouse shared] getDeviceInfo:completation];
+}
+
+/// 发送数据给设备
+-(void)sendData:(NSData *)data toDevice:(IOHIDDeviceRef)device{
+ if(device == nil){
+ [self showLog:@"请先连上设备"];
+ return;
+ }
+ [self showLog:[NSString stringWithFormat:@"开始发送[send] %@\n%@",[AiMouseTools dataToHexString:data],[AiMouseTools dataToUtf8String:data]]];
+
+ IOReturn ret = IOHIDDeviceSetReport(device, kIOHIDReportTypeOutput, 0, data.bytes, data.length);
+ if (ret != kIOReturnSuccess) {
+ [self showLog:[NSString stringWithFormat:@"发送失败! code = %d",ret]];
+ }else{
+ [self showLog:@"发送成功!"];
+ }
+}
+//将录音数据保存
+- (void)finishRecored:(NSData *)data{
+ NSString *doc = NSTemporaryDirectory();
+ NSString *fullPath = [NSString stringWithFormat:@"%@1.pcm",doc];
+ NSError *err;
+ [data writeToFile:fullPath options:NSDataWritingAtomic error:&err];
+ if (err) {
+ [self showLog:[NSString stringWithFormat:@"录音保存失败 %@",err.description]];
+ }
+ else{
+ [self showLog:[NSString stringWithFormat:@"录音保存成功 path = %@",fullPath]];
+ }
+}
+- (void)showLog:(NSString *)log{
+ NSLog(@"%@",log);
+}
+
+/// 实际到数据长度
+static inline int get_data_len(uint8_t *buf, u_long len) {
+ if (len <= 0 ) return 0;
+ int url_len = 0;
+ while (buf[url_len] != 0x00) url_len++;
+ return url_len;
+}
+
+/// 获取对应属性值
+static uint32_t IOHIDDevGetUInt32Property(IOHIDDeviceRef inIOHIDDeviceRef, CFStringRef inKey) {
+ uint32_t outValue = 0;
+ if (inIOHIDDeviceRef != NULL) {
+ CFTypeRef tCFTypeRef = IOHIDDeviceGetProperty(inIOHIDDeviceRef, inKey);
+ if (tCFTypeRef != NULL && (CFNumberGetTypeID() == CFGetTypeID(tCFTypeRef)) ) {
+ Boolean result = CFNumberGetValue((CFNumberRef) tCFTypeRef, kCFNumberSInt32Type, &outValue);
+ if (!result) {
+ NSLog(@"get %@ failed.", inKey);
+ }
+ }
+ }
+ return outValue;
+}
+@end
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict/>
+</plist>
<dict>
<key>com.apple.security.app-sandbox</key>
<true/>
+ <key>com.apple.security.device.audio-input</key>
+ <true/>
<key>com.apple.security.device.bluetooth</key>
<true/>
+ <key>com.apple.security.device.usb</key>
+ <true/>
<key>com.apple.security.files.user-selected.read-only</key>
<true/>
<key>com.apple.security.network.client</key>
--- /dev/null
+//
+// ViewController.m
+// MouseSdk
+//
+// Created by incar on 2024/2/18.
+//
+
+#import "ViewController.h"
+#import "ScanVC.h"
+#import "DeviceManger.h"
+
+@interface ViewController ()
+@property(nonatomic,strong)NSTextField *typeLabel;///当前模式状态
+@property(nonatomic,strong)NSTextField *connectLabel;///连接状态
+@property(nonatomic,strong)NSTextField *authLabel;///鉴权状态
+@property(nonatomic,strong)NSTextField *deviceInfoLabel;///设备信息
+@end
+
+@implementation ViewController
+
+- (void)viewDidLoad {
+ [super viewDidLoad];
+
+ // Do any additional setup after loading the view.
+ [self setupUI];
+ [self setupDeviceManger];
+}
+
+- (void)setRepresentedObject:(id)representedObject {
+ [super setRepresentedObject:representedObject];
+
+ // Update the view, if already loaded.
+}
+
+- (void)setupUI{
+ self.title = @"AI SDK";
+ {
+ NSButton *btn = [[NSButton alloc]initWithFrame:NSMakeRect(50, self.view.bounds.size.height - 100, 100, 45)];
+ btn.bordered = true;
+ btn.title = @"蓝牙扫描";
+ [btn setTarget:self];
+ [btn setAction:@selector(scanAction)];
+ btn.state = 1;
+ [self.view addSubview:btn];
+ }
+ {
+ NSButton *btn = [[NSButton alloc]initWithFrame:NSMakeRect(50, self.view.bounds.size.height - 200, 100, 45)];
+ btn.bordered = true;
+ btn.title = @"获取设备信息";
+ [btn setTarget:self];
+ [btn setAction:@selector(geviceInfoAction)];
+ btn.state = 1;
+ [self.view addSubview:btn];
+ }
+ {
+ NSButton *btn = [[NSButton alloc]initWithFrame:NSMakeRect(50, self.view.bounds.size.height - 0, 100, 45)];
+ btn.bordered = true;
+ btn.title = @"鉴权";
+ [btn setTarget:self];
+ [btn setAction:@selector(authAction)];
+ btn.state = 1;
+ [self.view addSubview:btn];
+ }
+ {
+ NSTextField *label = [[NSTextField alloc] initWithFrame:CGRectMake(180, self.view.bounds.size.height - 80, 300, 35)];
+ label.editable = NO;
+ label.bordered = NO;
+ label.stringValue = @"连接模式:--";
+ label.backgroundColor = NSColor.clearColor;
+ self.typeLabel = label;
+ [self.view addSubview:label];
+ }
+ {
+ NSTextField *label = [[NSTextField alloc] initWithFrame:CGRectMake(180, self.view.bounds.size.height - 120, 300, 35)];
+ label.editable = NO;
+ label.bordered = NO;
+ label.stringValue = @"连接状态:未连接";
+ label.backgroundColor = NSColor.clearColor;
+ self.connectLabel = label;
+ [self.view addSubview:label];
+ }
+ {
+ NSTextField *label = [[NSTextField alloc] initWithFrame:CGRectMake(180, self.view.bounds.size.height - 160, 300, 35)];
+ label.editable = NO;
+ label.bordered = NO;
+ label.stringValue = @"鉴权状态:unknow";
+ label.backgroundColor = NSColor.clearColor;
+ self.authLabel = label;
+ [self.view addSubview:label];
+ }
+ {
+ NSTextField *label = [[NSTextField alloc] initWithFrame:CGRectMake(180, self.view.bounds.size.height - 260, 300, 100)];
+ label.editable = NO;
+ label.bordered = NO;
+ label.stringValue = @"";
+ label.backgroundColor = NSColor.clearColor;
+ self.deviceInfoLabel = label;
+ [self.view addSubview:label];
+ }
+}
+
+#pragma mark - action
+- (void)scanAction{
+ ScanVC *vc = [[ScanVC alloc] initWithNibName:nil bundle:nil];
+ [self presentViewControllerAsModalWindow:vc];
+}
+
+/// 获取设备信息
+- (void)geviceInfoAction{
+ [[DeviceManger shared] getDeviceInfo:^(AiMouseDeviceInfo *deviceInfo, NSError *error) {
+ if (deviceInfo) {
+ NSString *info = [NSString stringWithFormat:@"battery_power = %@,CPI = %@,CPI_list = %@,version = %@,brand = %@,sn = %@,mac = %@",deviceInfo.battery_power,deviceInfo.CPI,deviceInfo.CPI_list,deviceInfo.version,deviceInfo.brand,deviceInfo.sn,deviceInfo.mac];
+ NSLog(@"%@",info);
+
+ dispatch_async(dispatch_get_main_queue(), ^{
+ self.deviceInfoLabel.stringValue = info;
+ });
+ }
+ else{
+ NSString *info = [NSString stringWithFormat:@"error == %@",error.description];
+ NSLog(@"%@",info);
+ dispatch_async(dispatch_get_main_queue(), ^{
+ self.deviceInfoLabel.stringValue = info;
+ });
+ }
+ }];
+}
+- (void)showAuthResult:(BOOL)isSuccess{
+ dispatch_async(dispatch_get_main_queue(), ^{
+ self.authLabel.stringValue = isSuccess?@"鉴权状态:鉴权成功":@"鉴权状态:鉴权失败";
+ });
+}
+- (void)connectStateDidChange:(AiMouseConnectType)type connectState:(BOOL)isConnected{
+ dispatch_async(dispatch_get_main_queue(), ^{
+ if(isConnected){
+ self.typeLabel.stringValue = type == AiMouseConnectType_bluetooth ?@"连接模式:蓝牙":@"连接模式:hid";
+ self.connectLabel.stringValue = isConnected?@"连接状态:已连接":@"连接状态:未连接";
+ }
+ else{
+ self.typeLabel.stringValue = @"连接模式:--";
+ self.connectLabel.stringValue = @"连接状态:未连接";
+ }
+ });
+}
+
+- (void)setupDeviceManger{
+ DeviceManger *manager = [DeviceManger shared];
+ __weak typeof(self) ws = self;
+ manager.authCallBack = ^(BOOL isSuccess) {
+ [ws showAuthResult:isSuccess];
+ };
+ manager.connectStateCallBack = ^(AiMouseConnectType type,BOOL isConnected) {
+ [ws connectStateDidChange:type connectState:isConnected];
+ };
+}
+
+- (void)authAction{
+ [[DeviceManger shared] startAuthentication];
+}
+@end
#import <Foundation/Foundation.h>
#import <AiMouseSdk/AiMouseDeviceInfo.h>
+typedef NS_ENUM(NSInteger,AiMouseConnectType) {
+ AiMouseConnectType_bluetooth = 0,///蓝牙
+ AiMouseConnectType_hid,///hid
+};
+
typedef NS_ENUM(NSInteger,AiMouseAuthState) {
AiMouseAuthState_Unknow = 0,///未知
AiMouseAuthState_Success,///鉴权成功
/// 鼠标按键指令回调
/// - Parameter data: 数据。
-/// M 键 短按0x42;长按按下(开始录音)0x25, 长按抬起(结束录音) 0x26;
-/// AI键 短按0x43 ,长按按下(开始录音)0x27, 长按抬起(结束录音) 0x28;
-/// 语音键 按下(开始录音) 0x31,弹起(结束录音)0x32;
+/// 前 第一次单击31(开始录音), 第二次单击32(结束录音) , 按下21(开始录音)抬起22(结束录音)
+/// 中 单击42, 按下25(开始录音)抬起26(结束录音)
+/// 后 单击43,按下27(开始录音)抬起28(结束录音)
/// 其他未定义
- (void)aiMouseSendCmdData:(NSData *)data;
@interface AiMouse : NSObject
@property (nonatomic, readonly) NSString *version;/// 版本号
@property (nonatomic, weak) id<AiMouseDelegate> delegate;/// 代理
-@property (nonatomic, readonly) AiMouseAuthState authState;/// 鉴权状态,默认是Unknow。所以必须在连上蓝牙设备找到鉴权特征后,需要主动调用startAuthentication方法去鉴权。(只有鉴权成功,AI键,语音键、M键才可用)
+@property (nonatomic, readonly) AiMouseConnectType connectType;//连接类型
+@property (nonatomic, readonly) AiMouseAuthState authState;/// 鉴权状态,默认是Unknow。所以必须在连上蓝牙设备找到鉴权特征后,需要主动调用startAuthentication方法去鉴权。(只有鉴权成功,AI功能才可用)
/// 单利
+(AiMouse *)shared;
+/// 切换连接类型
+/// - Parameter type: 连接类型
+- (void)switchConnect:(AiMouseConnectType)type;
/// 开始鉴权
/// - Parameter finished: 鉴权结果回调
#import <AiMouseSdk/AiMouse.h>
#import <AiMouseSdk/AiMouseTools.h>
+
+
+
<key>DTXcodeBuild</key>
<string>15A507</string>
<key>LSMinimumSystemVersion</key>
- <string>13.5</string>
+ <string>11.0</string>
</dict>
</plist>
<dict>
<key>Resources/Info.plist</key>
<data>
- Lkh888iUHx89JiNGsxXEdzbO3UE=
+ BEhk2dRlVKxjGdSQ6bXVd4fwFpw=
</data>
</dict>
<key>files2</key>
<dict>
<key>hash2</key>
<data>
- 7pIlETACg6jIAd8J1lBfoYKnQDcqmUBJga9MBIHdYQI=
+ 1q45x9qsTiK0c1yPH9TcxDbr7WuKUf3djz7cnjSE1ug=
</data>
</dict>
<key>Headers/AiMouseDeviceInfo.h</key>
<dict>
<key>hash2</key>
<data>
- vKnPzInbrOTjtIQqZKZvozSl9iFo3gPJOWEkCrYBwY0=
+ j6E8zomqgAjtlzFBiOltyBqOKrPan89qh/+RMFwXieA=
</data>
</dict>
<key>Headers/AiMouseTools.h</key>
<dict>
<key>hash2</key>
<data>
- 5TpMXKNId/cbGOgp6madnlUHUvYfRBV4FLH5wr2I/Ko=
+ stE6KNrnohQ5irGBpLYAh4W+N+N7c1ff0TQTmprDBHo=
</data>
</dict>
</dict>
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 5992,
+ "offset": 6178,
"length": 36,
"value": "\"曲连 初始化 结果: \""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 6027,
+ "offset": 6213,
"length": 2,
"value": "\"\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "IntegerLiteral",
- "offset": 6095,
+ "offset": 6281,
"length": 1,
"value": "0"
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 6277,
+ "offset": 6463,
"length": 26,
"value": "\"初始化:异步线程\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 6389,
+ "offset": 6575,
"length": 23,
"value": "\"初始化:主线程\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 6606,
+ "offset": 6792,
"length": 26,
"value": "\"注销 结果: \""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 6631,
+ "offset": 6817,
"length": 2,
"value": "\"\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "IntegerLiteral",
- "offset": 6687,
+ "offset": 6873,
"length": 1,
"value": "0"
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 6855,
+ "offset": 7041,
"length": 23,
"value": "\"注销:异步线程\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 6966,
+ "offset": 7152,
"length": 20,
"value": "\"注销:主线程\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 7128,
+ "offset": 7314,
"length": 55,
"value": "\"====>>>> IotMqttManager publishMessage topic:\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 7182,
+ "offset": 7368,
"length": 2,
"value": "\"\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "IntegerLiteral",
- "offset": 7310,
+ "offset": 7496,
"length": 1,
"value": "1"
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 7513,
+ "offset": 7699,
"length": 42,
"value": "\"====>>>> 发送mqtt jsoon数据2 \""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 7554,
+ "offset": 7740,
"length": 2,
"value": "\"\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 7666,
+ "offset": 7852,
"length": 55,
"value": "\"====>>>> 发送mqtt jsoon数据 数据格式化异常\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 9155,
+ "offset": 9341,
"length": 42,
"value": "\"====>>>>> 发布消息 结果: \""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 9196,
+ "offset": 9382,
"length": 2,
"value": "\"\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "IntegerLiteral",
- "offset": 9314,
+ "offset": 9500,
"length": 1,
"value": "1"
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "IntegerLiteral",
- "offset": 9357,
+ "offset": 9543,
"length": 1,
"value": "0"
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "IntegerLiteral",
- "offset": 9439,
+ "offset": 9625,
"length": 1,
"value": "0"
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "IntegerLiteral",
- "offset": 9649,
+ "offset": 9835,
"length": 1,
"value": "0"
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 9676,
+ "offset": 9862,
"length": 32,
"value": "\"订阅主题 结果: \""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 9707,
+ "offset": 9893,
"length": 2,
"value": "\"\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 9923,
+ "offset": 10109,
"length": 38,
"value": "\"取消订阅主题 结果: \""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 9960,
+ "offset": 10146,
"length": 2,
"value": "\"\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 5992,
+ "offset": 6178,
"length": 36,
"value": "\"曲连 初始化 结果: \""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 6027,
+ "offset": 6213,
"length": 2,
"value": "\"\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "IntegerLiteral",
- "offset": 6095,
+ "offset": 6281,
"length": 1,
"value": "0"
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 6277,
+ "offset": 6463,
"length": 26,
"value": "\"初始化:异步线程\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 6389,
+ "offset": 6575,
"length": 23,
"value": "\"初始化:主线程\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 6606,
+ "offset": 6792,
"length": 26,
"value": "\"注销 结果: \""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 6631,
+ "offset": 6817,
"length": 2,
"value": "\"\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "IntegerLiteral",
- "offset": 6687,
+ "offset": 6873,
"length": 1,
"value": "0"
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 6855,
+ "offset": 7041,
"length": 23,
"value": "\"注销:异步线程\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 6966,
+ "offset": 7152,
"length": 20,
"value": "\"注销:主线程\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 7128,
+ "offset": 7314,
"length": 55,
"value": "\"====>>>> IotMqttManager publishMessage topic:\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 7182,
+ "offset": 7368,
"length": 2,
"value": "\"\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "IntegerLiteral",
- "offset": 7310,
+ "offset": 7496,
"length": 1,
"value": "1"
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 7513,
+ "offset": 7699,
"length": 42,
"value": "\"====>>>> 发送mqtt jsoon数据2 \""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 7554,
+ "offset": 7740,
"length": 2,
"value": "\"\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 7666,
+ "offset": 7852,
"length": 55,
"value": "\"====>>>> 发送mqtt jsoon数据 数据格式化异常\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 9155,
+ "offset": 9341,
"length": 42,
"value": "\"====>>>>> 发布消息 结果: \""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 9196,
+ "offset": 9382,
"length": 2,
"value": "\"\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "IntegerLiteral",
- "offset": 9314,
+ "offset": 9500,
"length": 1,
"value": "1"
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "IntegerLiteral",
- "offset": 9357,
+ "offset": 9543,
"length": 1,
"value": "0"
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "IntegerLiteral",
- "offset": 9439,
+ "offset": 9625,
"length": 1,
"value": "0"
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "IntegerLiteral",
- "offset": 9649,
+ "offset": 9835,
"length": 1,
"value": "0"
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 9676,
+ "offset": 9862,
"length": 32,
"value": "\"订阅主题 结果: \""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 9707,
+ "offset": 9893,
"length": 2,
"value": "\"\""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 9923,
+ "offset": 10109,
"length": 38,
"value": "\"取消订阅主题 结果: \""
},
{
"filePath": "\/Users\/apple\/Desktop\/code\/MouseSdk-iOS\/MouseSdk\/AliIotConnectKitSDK\/AliIotConnectKit\/Mqtt\/IotMqtt\/IotMqttManager_C.swift",
"kind": "StringLiteral",
- "offset": 9960,
+ "offset": 10146,
"length": 2,
"value": "\"\""
},
<dict>
<key>hash2</key>
<data>
- FfGjeGCxTCx7ayLfCPgaan92ZPyOTsf6WkcMV/qOCw0=
+ f8m7mXNqlfQi65TH3ZqAXlRbMKhyQ7j5evHFLZQK1Ac=
</data>
</dict>
<key>Modules/AliIotConnectKit.swiftmodule/Project/x86_64-apple-macos.swiftsourceinfo</key>
<dict>
<key>hash2</key>
<data>
- hTADtwRw04Q8S4kKt2x0FSF+IHoyQMr5BEQki1s2Lwk=
+ CTjN317I8SCd1kzRBvA99R+W31Nhpj5uhQllTNCH9Ho=
</data>
</dict>
<key>Modules/AliIotConnectKit.swiftmodule/arm64-apple-macos.abi.json</key>
<dict>
<key>hash2</key>
<data>
- Xf1Dj3FlLWGJp/7R9u81BdUprJsa40qncs6rk6uihaQ=
+ QOBr2CYQSr3ZC2Cf/kO3IlfwmEdtVqfiZoOkIHLxMPY=
</data>
</dict>
<key>Modules/AliIotConnectKit.swiftmodule/arm64-apple-macos.private.swiftinterface</key>
<dict>
<key>hash2</key>
<data>
- Xf1Dj3FlLWGJp/7R9u81BdUprJsa40qncs6rk6uihaQ=
+ QOBr2CYQSr3ZC2Cf/kO3IlfwmEdtVqfiZoOkIHLxMPY=
</data>
</dict>
<key>Modules/AliIotConnectKit.swiftmodule/x86_64-apple-macos.private.swiftinterface</key>