Subscription using Driver with RxSwift
<p>I have a question about RxSwift and the use with Driver.</p>

<p>I tried only with this pattern</p>

<pre><code>        loginButton.rx_tap
             .doOn({[unowned self] _ in
                 self.loginButton.enabled = false
             })
             .debug()
             .flatMap({[unowned self] in self.loginViewModel.login() })
             .subscribeNext({ [weak self] login  in
               // Custom code
        })
        .addDisposableTo(disposeBag)
</code></pre>

<p>So all starts with a tap to a button...but If I can try to start in this way:</p>

<pre><code>    let contractCode = Variable(contractDetail.contractCode).asDriver()
    viewModel = viewModel(provider: apiProvider! as! RxMoyaProvider&lt;APIProvider&gt;, contractCode: contractCode)
    _ = viewModel?.getStatus()
    .subscribeNext({ data in
        print(data)
        guard data?.result == 1 else {
            // ALERT
            return;
        }
        // Custom code
    })
</code></pre>

<p>Where contractDetail.contractCode is a String, contractCode in the viewModel is a Driver. 
It subscribes to it but doesn't fires onNext so subscribeNext doesn't get called.
Can you help me? what is wrong about this approach?
Thanks</p>