From: liangzhenying <867174124@qq.com> Date: Mon, 24 Feb 2025 05:47:16 +0000 (+0800) Subject: 修复了AI登录失败bug X-Git-Url: http://git.snicker.com.cn/?a=commitdiff_plain;h=f0456cd6c1e81d23efced7cb746dd53faefe5a60;p=mirrors%2FIOTBluetooth-iOS.git 修复了AI登录失败bug --- diff --git a/IOTBluetooth/IOTBluetooth/Example/Datas.swift b/IOTBluetooth/IOTBluetooth/Example/Datas.swift index 139e1bd..10563ad 100644 --- a/IOTBluetooth/IOTBluetooth/Example/Datas.swift +++ b/IOTBluetooth/IOTBluetooth/Example/Datas.swift @@ -11,35 +11,35 @@ import IOTBluetooth let datas: [(ability: IBAbility, label: String, parameters: [IBParameter])] = [ -// (.sendSchedule,"发送日程管理给手表",[.sendSchedule([IBSchedule()])]), -// (.getSosContact,"获取OS紧急联系人",[]), -// (.setSosContact,"设置SOS紧急联系人",[.setSosContact([IBContact()])]), -// -// (.getPushConfig,"获取推送配置",[]), -// (.setPushConfig,"设置推送",[.setPush(IBPush.all)]), -// -// (.getPasssword,"获取密码",[]), -// (.setPasssword,"启用密码",[.setPassword(IBPassword(type: 1, password: "123456"))]), -// (.setPasssword,"删除密码",[.setPassword(IBPassword(type: 0, password: ""))]), -// -// (.userData,"设置用户数据",[.userInfo(IBUserInfo())]), -// (.language, "设置语言", [.language(.chinese)]), -// (.about,"关于本机内容",[]), -// (.find, "开始查找手表", [.action(1)]), -// (.find, "停止查找手表", [.action(0)]), -// (.message, "开启消息推送功能", [.action(1)]), -// (.message, "关闭消息推送功能", [.action(0)]), -// -// (.takePhoto, "开启手势拍照", [.action(1)]), -// (.takePhoto, "关闭手势拍照", [.action(0)]), -// (.restore, "恢复出厂设置", []), -// (.reboot, "重新启动", []), -// (.shutdown, "关机", []), -// (.fetchScreen, "获取手表屏幕参数", []), -// (.screen, "设置手表屏幕参数", [.screen(Config.setScreen())]), -// (.fetchBattery, "获取电量", []), -// (.fetchClock, "获取闹钟设置", []), -// (.setClock, "发送闹钟设置", [.clock(IBClock())]), + (.sendSchedule,"发送日程管理给手表",[.sendSchedule([IBSchedule()])]), + (.getSosContact,"获取OS紧急联系人",[]), + (.setSosContact,"设置SOS紧急联系人",[.setSosContact([IBContact()])]), + + (.getPushConfig,"获取推送配置",[]), + (.setPushConfig,"设置推送",[.setPush(IBPush.all)]), + + (.getPasssword,"获取密码",[]), + (.setPasssword,"启用密码",[.setPassword(IBPassword(type: 1, password: "123456"))]), + (.setPasssword,"删除密码",[.setPassword(IBPassword(type: 0, password: ""))]), + + (.userData,"设置用户数据",[.userInfo(IBUserInfo())]), + (.language, "设置语言", [.language(.chinese)]), + (.about,"关于本机内容",[]), + (.find, "开始查找手表", [.action(1)]), + (.find, "停止查找手表", [.action(0)]), + (.message, "开启消息推送功能", [.action(1)]), + (.message, "关闭消息推送功能", [.action(0)]), + + (.takePhoto, "开启手势拍照", [.action(1)]), + (.takePhoto, "关闭手势拍照", [.action(0)]), + (.restore, "恢复出厂设置", []), + (.reboot, "重新启动", []), + (.shutdown, "关机", []), + (.fetchScreen, "获取手表屏幕参数", []), + (.screen, "设置手表屏幕参数", [.screen(Config.setScreen())]), + (.fetchBattery, "获取电量", []), + (.fetchClock, "获取闹钟设置", []), + (.setClock, "发送闹钟设置", [.clock(IBClock())]), (.fetchCurrentDialId, "发送当前表盘ID", []), (.switchDial, "切换表盘", [.dialID(120)]), diff --git a/IOTBluetooth/IOTBluetooth/IOTBluetooth.xcworkspace/xcuserdata/yaozuopan.xcuserdatad/UserInterfaceState.xcuserstate b/IOTBluetooth/IOTBluetooth/IOTBluetooth.xcworkspace/xcuserdata/yaozuopan.xcuserdatad/UserInterfaceState.xcuserstate index a99126d..72f146b 100644 Binary files a/IOTBluetooth/IOTBluetooth/IOTBluetooth.xcworkspace/xcuserdata/yaozuopan.xcuserdatad/UserInterfaceState.xcuserstate and b/IOTBluetooth/IOTBluetooth/IOTBluetooth.xcworkspace/xcuserdata/yaozuopan.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/IOTBluetooth/IOTBluetooth/IOTBluetooth/IBReceiveManager.swift b/IOTBluetooth/IOTBluetooth/IOTBluetooth/IBReceiveManager.swift index 0e6ef0a..7c69522 100644 --- a/IOTBluetooth/IOTBluetooth/IOTBluetooth/IBReceiveManager.swift +++ b/IOTBluetooth/IOTBluetooth/IOTBluetooth/IBReceiveManager.swift @@ -70,6 +70,7 @@ class IBReceiveManager { IBBluetooth.shared.currentConnected.productID = info.productID IBBluetooth.shared.currentConnected.customerID = info.customerID sendDeviceInfo() + IBAiManager.shared.login() } if IBNotify.handle(data) { diff --git a/IOTBluetooth/IOTBluetooth/IOTBluetooth/IBluetooth.swift b/IOTBluetooth/IOTBluetooth/IOTBluetooth/IBluetooth.swift index de72d12..2a8535d 100644 --- a/IOTBluetooth/IOTBluetooth/IOTBluetooth/IBluetooth.swift +++ b/IOTBluetooth/IOTBluetooth/IOTBluetooth/IBluetooth.swift @@ -212,8 +212,6 @@ extension IBBluetooth: CBCentralManagerDelegate { // IBNotify.post(.connectedDeviceDidChange) Logger.log("已连接", currentConnected.name) IBNotify.post(.connectStateDidChange, object: 1) - - IBAiManager.shared.login() } func centralManager(_ central: CBCentralManager, didFailToConnect peripheral: CBPeripheral, error: Error?) {