Swift 2 to Swift 3 NSNotification/Notification
<p>Using <code>XCode 8 beta 6</code> under El Capitan coding in <code>Swift 3.0</code></p>

<p>Trying to translate these lines in a project from <code>Swift 2.0</code> to <code>Swift 3.0</code></p>

<pre><code>let userInfo = ["peer": peerID, "state": state.toRaw()]
NSNotificationCenter.defaultCenter.postNotificationName("Blah", object: nil, userInfo: userInfo)
</code></pre>

<p>So I managed to cobble together this ...</p>

<pre><code>public class MyClass {
    static let myNotification = Notification.Name("Blah")
    }

let userInfo = ["peerID":peerID,"state":state.rawValue] as [String : Any]
NotificationCenter.default.post(name: MyClass.myNotification, object: userInfo)
</code></pre>

<p>It compiles and sends the notification when I run it and setup a listener with this line, but with no userInfo that I can decode?</p>

<pre><code> let notificationName = Notification.Name("Blah")
    NotificationCenter.default.addObserver(self, selector: #selector(peerChangedStateWithNotification), name: notificationName, object: nil)
</code></pre>

<p>This code prints "nil" as in no userInfo ...</p>

<pre><code>func peerChangedStateWithNotification(notification:NSNotification) {
    print("\(notification.userInfo)")
}
</code></pre>