     }
 
     private func fail(withReason reason: MeshSetupFlowError, severity: MeshSetupErrorSeverity = .Error, nsError: Error? = nil) {
-        log("error: \(reason.localizedDescription), nsError: \(nsError?.localizedDescription)")
+        log("error: \(reason.localizedDescription), nsError: \(nsError?.localizedDescription as Optional)")
         self.delegate.meshSetupError(error: reason, severity: severity, nsError: nsError)
     }
 


    func meshSetupDidRequestToChooseBetweenRetryInternetOrSwitchToJoinerFlow(setSwitchToJoiner: @escaping MeshSetupSetBool)

    func meshSetupDidEnterState(state: MeshSetupFlowState)
    func meshSetupError(error: MeshSetupFlowError, severity: MeshSetupErrorSeverity, nsError: Error?)
}

    case InitialDeviceConnecting
    case InitialDeviceConnected
    case InitialDeviceReady

    case CommissionerDeviceConnecting
    case CommissionerDeviceConnected
    case CommissionerDeviceReady
