         return false
     }
     
+    func connectOrSwitchToNewPeripheral(after timeout: TimeInterval) {
+        // In Legacy DFU the DFU bootloader by default advertises with the
+        // same MAC address as the application. However, recent changes in iOS
+        // (see: https://github.com/NordicSemiconductor/IOS-Pods-DFU-Library/issues/368#issuecomment-619066196)
+        // made it necessary for the bootloader to change its address.
+        // This requires updating the bootloader or the app on the device, as
+        // explaind in the above-mentioned issue.
+        // Then, this flag needs to be set to true in the `DFUServiceInitiator`.
+        // With that flag equal to true, the library will try to connect to the
+        // same device (with a short timeout), and if that fails, will try to
+        // scan for a new address using `DFUPeripheralSelector`.
+        connect(withTimeout: timeout) { [unowned self] in
+            // Scan for a new device and connect to it.
+            self.switchToNewPeripheralAndConnect()
+        }
+    }
+    
     func switchToNewPeripheralAndConnect() {
-        // Release the previous peripheral
+        // Release the previous peripheral.
         peripheral!.delegate = nil
         peripheral = nil
         cleanUp()

        self.experimentalButtonlessServiceInSecureDfuEnabled = initiator.enableUnsafeExperimentalButtonlessServiceInSecureDfu
        self.uuidHelper = initiator.uuidHelper
        self.connectionTimeout = initiator.connectionTimeout

        super.init()
    }

        if shouldReconnect {
            shouldReconnect = false
            // We need to reconnect to the device.
            connect(withTimeout: 5.0)
        } else if jumpingToBootloader {
            jumpingToBootloader = false
            if newAddressExpected {
                newAddressExpected = false
                
                // If in Legacy DFU, and `forceScanningForNewAddressInLegacyDfu`
                // is set to true, try first connecting to the same peripheral.
                // Perheps it has not been updated to use incremented address yet.
                if forceScanningForNewAddressInLegacyDfu {
                    // Despite the fact, that a new address is expected,
                    // try to reconnect to the same device.
                    connectOrSwitchToNewPeripheral(after: 2.0)
                } else {
                    switchToNewPeripheralAndConnect()
                }
            } else {
                // Connect again, hoping for DFU mode this time.
                connect(withTimeout: 5.0)
            }
        } else if activating {
            activating = false
