         let action = UIAlertAction(title: title, style: style) { [unowned self] action in
             guard self != nil else { return }
 
-            let result = Result(alert: self.alertController, button: title)
+            let result = Result(alert: self.alertController, buttonTitle: title,
+                                buttonIndex: self.alertController.actions.indexOf(action) ?? 0)
 
             self.observer?.onNext(result)
             self.observer?.onCompleted()

public class AlertController: NSObject {

    public struct Result {
        public let buttonTitle: String
        public let controller: UIAlertController

        init(alert: UIAlertController, button title: String) {
            buttonTitle = title
            controller  = alert
        }
    }

        let action = UIAlertAction(title: title, style: style) { [unowned self] action in
            guard self != nil else { return }

            let result = Result(alert: self.alertController, buttonTitle: title,
                                buttonIndex: self.alertController.actions.indexOf(action) ?? 0)

            self.observer?.onNext(result)
            self.observer?.onCompleted()
