Update, I actually found this.
extension BluetoothViewModel: CBPeripheralDelegate {
func peripheralDidUpdateName(_ peripheral: CBPeripheral) {
print(peripheral.name!)
}
}
But changed my iPad name so many times but it won't fire the function.