diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 8bf262c98..cbcbc2de7 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -526,8 +526,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 537SFY28XS; + CURRENT_PROJECT_VERSION = 9; + DEVELOPMENT_TEAM = K39FB49XKY; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Deep Voice"; @@ -536,6 +536,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + MARKETING_VERSION = 1.0.1; PRODUCT_BUNDLE_IDENTIFIER = com.saitong.voitrans; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -720,7 +721,7 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + CURRENT_PROJECT_VERSION = 9; DEVELOPMENT_TEAM = K39FB49XKY; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; @@ -730,6 +731,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + MARKETING_VERSION = 1.0.1; PRODUCT_BUNDLE_IDENTIFIER = com.saitong.voitrans; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; @@ -746,8 +748,8 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Runner/Runner.entitlements; - CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; - DEVELOPMENT_TEAM = 537SFY28XS; + CURRENT_PROJECT_VERSION = 9; + DEVELOPMENT_TEAM = K39FB49XKY; ENABLE_BITCODE = NO; INFOPLIST_FILE = Runner/Info.plist; INFOPLIST_KEY_CFBundleDisplayName = "Deep Voice"; @@ -756,6 +758,7 @@ "$(inherited)", "@executable_path/Frameworks", ); + MARKETING_VERSION = 1.0.1; PRODUCT_BUNDLE_IDENTIFIER = com.saitong.voitrans; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; diff --git a/lib/modules/devices/controllers/devices_controller.dart b/lib/modules/devices/controllers/devices_controller.dart index 8dd28c7a8..1beadea7a 100644 --- a/lib/modules/devices/controllers/devices_controller.dart +++ b/lib/modules/devices/controllers/devices_controller.dart @@ -6,8 +6,6 @@ import '/data/services/ble_manager.dart'; import '/data/services/network/api.dart'; import '/routes/app_routes.dart'; import 'package:get/get.dart'; -import 'package:get/get_rx/get_rx.dart'; -import 'package:get/get_state_manager/src/simple/get_controllers.dart'; /* 设备管理 diff --git a/lib/modules/meeting/controllers/meeting_home_controller.dart b/lib/modules/meeting/controllers/meeting_home_controller.dart index d2c0eb3a9..a2daa919e 100644 --- a/lib/modules/meeting/controllers/meeting_home_controller.dart +++ b/lib/modules/meeting/controllers/meeting_home_controller.dart @@ -305,7 +305,6 @@ class MeetingHomeController extends GetxController { } else { FilePickerResult? result = await FilePicker.platform.pickFiles( withData: true, - type: FileType.audio, ); if (result != null) { PlatformFile file = result.files.first; diff --git a/lib/modules/pairing/controllers/pairing_controller.dart b/lib/modules/pairing/controllers/pairing_controller.dart index a8f0e8acc..45912c231 100644 --- a/lib/modules/pairing/controllers/pairing_controller.dart +++ b/lib/modules/pairing/controllers/pairing_controller.dart @@ -2,6 +2,7 @@ import 'dart:convert'; import 'dart:typed_data'; import 'package:app_settings/app_settings.dart'; +import 'package:voitrans/data/models/appconfig_model.dart'; import '/data/models/appconfig.dart'; import '/data/models/user_Info.dart'; import '/data/services/network/api.dart'; @@ -610,6 +611,10 @@ class PairingController extends GetxController { // 检查设备名称是否包含 DeepSound 或 DeapSound final deviceName = device.name; + // 检查是否已有BLE绑定的设备 + final product = AppConfig.config.products + .firstWhere((d) => d.devicename == device.name); + final names = AppConfig.allproductNames(); // 检查是否已有绑定的设备 print("device.address${device.address}"); @@ -746,7 +751,12 @@ class PairingController extends GetxController { } await Future.delayed(Duration(seconds: 1)); } - return 1; + if (product.devicetype == 2) { + //ble设备 必须要扫描到结果 + return 0; + } else { + return 1; + } } return 0; //可以跳转1 diff --git a/local_plugins/ble_service/ios/ble_service/Sources/ble_service/BleService.swift b/local_plugins/ble_service/ios/ble_service/Sources/ble_service/BleService.swift index 66b8d73e2..33f0e9f14 100644 --- a/local_plugins/ble_service/ios/ble_service/Sources/ble_service/BleService.swift +++ b/local_plugins/ble_service/ios/ble_service/Sources/ble_service/BleService.swift @@ -66,6 +66,9 @@ public class BleService: NSObject { // 自动重连队列(统一管理所有待连接的设备) private var pendingReconnectUUIDs = Set() + // 标记是否为主动断开连接 + private var isManualDisconnect = false + private let logger = OSLog(subsystem: "com.yunqiinnovation.ble_service", category: "BleService") // MARK: - Opus音频处理器 @@ -365,6 +368,7 @@ private var cmdReplyType: UInt8 = 0 } if centralManager != nil { + isManualDisconnect = true // 标记为主动断开 updateConnectionState(BleConst.STATE_DISCONNECTING) centralManager?.cancelPeripheralConnection(peripheral) os_log("🔌 开始断开设备连接", log: logger, type: .info) @@ -1420,13 +1424,18 @@ extension BleService: CBCentralManagerDelegate { updateConnectionState(BleConst.STATE_DISCONNECTED) - // 无论是否意外断开,都立即发起新的连接 - if central.state == .poweredOn { - os_log("🔄 立即重新连接设备: %{public}@", log: logger, type: .info, peripheral.identifier.uuidString) - connectPeripheral(peripheral) + // 只有在非主动断开的情况下才重新连接 + if !isManualDisconnect { + if central.state == .poweredOn { + os_log("🔄 意外断开,立即重新连接设备: %{public}@", log: logger, type: .info, peripheral.identifier.uuidString) + connectPeripheral(peripheral) + } else { + os_log("🔄 蓝牙未就绪,添加到重连队列: %{public}@", log: logger, type: .info, peripheral.identifier.uuidString) + pendingReconnectUUIDs.insert(peripheral.identifier) + } } else { - os_log("🔄 蓝牙未就绪,添加到重连队列: %{public}@", log: logger, type: .info, peripheral.identifier.uuidString) - pendingReconnectUUIDs.insert(peripheral.identifier) + os_log("✅ 主动断开连接,不进行自动重连", log: logger, type: .info) + isManualDisconnect = false // 重置标志 } } diff --git a/pubspec.yaml b/pubspec.yaml index 2439e4cff..4e7144562 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -1,7 +1,7 @@ name: voitrans description: "Voitrans - AI Voice Assistant." publish_to: "none" -version: 1.0.3+8 +version: 1.0.3+9 environment: sdk: ">=3.3.0 <4.0.0"