Refactor BLE plugin structure and rename to 'ble' for consistency across platforms

This commit is contained in:
TonyLu
2026-05-07 17:22:39 +08:00
parent d670143817
commit 020abb118f
19 changed files with 163 additions and 121 deletions
@@ -1,14 +1,14 @@
import Foundation
import Flutter
/// iOS stub BLE peripheral (CoreBluetooth CBPeripheralManager) is available on iOS but
/// iOS stub - BLE peripheral (CoreBluetooth CBPeripheralManager) is available on iOS but
/// not yet implemented. `isSupported` returns false; all other methods are no-ops.
public class BleRelayHostPlugin: NSObject, FlutterPlugin {
public class BlePlugin: NSObject, FlutterPlugin {
public static func register(with registrar: FlutterPluginRegistrar) {
let channel = FlutterMethodChannel(
name: "com.dalimaster.ble_relay_host",
name: "com.dalimaster.ble",
binaryMessenger: registrar.messenger())
let instance = BleRelayHostPlugin()
let instance = BlePlugin()
registrar.addMethodCallDelegate(instance, channel: channel)
}
@@ -20,4 +20,4 @@ public class BleRelayHostPlugin: NSObject, FlutterPlugin {
result(nil)
}
}
}
}
@@ -1,5 +1,5 @@
Pod::Spec.new do |s|
s.name = 'ble_relay_host'
s.name = 'ble'
s.version = '0.1.0'
s.summary = 'BLE GATT-server peripheral host for the DALI relay feature.'
s.description = <<-DESC