Merging two notification observers in RxSwift
<p>I have this piece of code:</p>

<pre><code>let appActiveNotifications: [Observable&lt;NSNotification&gt;] = [
    NSNotificationCenter.defaultCenter().rx_notification(UIApplicationWillEnterForegroundNotification),
    NSNotificationCenter.defaultCenter().rx_notification(Constants.AppRuntimeCallIncomingNotification)
]

appActiveNotifications.merge()
  .takeUntil(self.rx_deallocated)
  .subscribeNext() { [weak self] _ in
  // notification handling
}
.addDisposableTo(disposeBag)
</code></pre>

<p>It's supposed to listen to either of the specified notifications and handle when any of them is triggered.</p>

<p>However this does not compile. I get the following error:</p>

<pre><code>Value of type '[Observable&lt;NSNotification&gt;]' has no member 'merge'
</code></pre>

<p>How should I merge these two signals to one then?</p>