         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()

     Connects to the peripheral and performs service discovery.
     */
    fileprivate func connect() {
        let name = peripheral!.name ?? "Unknown device"
        logger.v("Connecting to \(name)...")
        // Set a connection timer.
        connectionTimer = DispatchSource.makeTimerSource()
        connectionTimer?.setEventHandler {
            if let peripheral = self.peripheral {
                self.connectionTimer?.cancel()
                self.logger.w("Connection timeout!")
                self.logger.d("centralManager.cancelPeripheralConnection(peripheral)")
                self.centralManager.cancelPeripheralConnection(peripheral)
            }
        }
        connectionTimer?.schedule(deadline: .now() + connectionTimeout)
        connectionTimer?.resume()
        logger.d("centralManager.connect(peripheral, options: nil)")
        centralManager.connect(peripheral!, options: nil)
    }
    
    fileprivate func cleanUp() {

                                 didDiscover peripheral: CBPeripheral,
                                 advertisementData: [String : Any], rssi RSSI: NSNumber) {
        // Is this a device we are looking for?
        if peripheralSelector.select(peripheral, advertisementData: advertisementData as [String : AnyObject],
                                     RSSI: RSSI, hint: bootloaderName) {
            // Hurray!
            connectionTimer?.cancel()
            connectionTimer = nil
            central.stopScan()
            
            if let name = advertisementData[CBAdvertisementDataLocalNameKey] as? String {
