import UIKit

extension UIViewController {
    
    @objc func wmf_showAlertWithError(_ error: NSError) {
        let alert = UIAlertController(title: error.localizedDescription, message: error.localizedRecoverySuggestion, preferredStyle: .alert)
        alert.addAction(UIAlertAction(title: CommonStrings.okTitle, style:.default, handler: nil))
        present(alert, animated: true, completion: nil)
    }
    
    @objc func wmf_showAlertWithMessage(_ message: String) {
        let alert = UIAlertController(title: nil, message: message, preferredStyle: .alert)
        alert.addAction(UIAlertAction(title: CommonStrings.okTitle, style:.default, handler: nil))
        present(alert, animated: true, completion: nil)
    }

    @objc func wmf_showAlert(title: String?, message: String?, actions: [UIAlertAction], completion: (() -> Void)? = nil) {
        let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
        actions.forEach { action in alert.addAction(action) }
        present(alert, animated: true, completion: completion)
    }
    
}

import UIKit

extension UIViewController {
    
    @objc func wmf_showAlertWithError(_ error: NSError) {
        let alert = UIAlertController(title: error.localizedDescription, message: error.localizedRecoverySuggestion, preferredStyle: .alert)
        alert.addAction(UIAlertAction(title: CommonStrings.okTitle, style:.default, handler: nil))
        present(alert, animated: true, completion: nil)
    }
    
    @objc func wmf_showAlertWithMessage(_ message: String) {
        let alert = UIAlertController(title: nil, message: message, preferredStyle: .alert)
        alert.addAction(UIAlertAction(title: CommonStrings.okTitle, style:.default, handler: nil))
        present(alert, animated: true, completion: nil)
    }
    
}

--- 
+++ 
@@ -13,5 +13,11 @@
         alert.addAction(UIAlertAction(title: CommonStrings.okTitle, style:.default, handler: nil))
         present(alert, animated: true, completion: nil)
     }
+
+    @objc func wmf_showAlert(title: String?, message: String?, actions: [UIAlertAction], completion: (() -> Void)? = nil) {
+        let alert = UIAlertController(title: title, message: message, preferredStyle: .alert)
+        actions.forEach { action in alert.addAction(action) }
+        present(alert, animated: true, completion: completion)
+    }
     
 }
Add alert controller helper that supports custom actions.
