I'm trying to use the NSNotificationCenter with Swift and I'm running into a problem. I'm trying the following:

```
class MyClass {

    init() {

        NSNotificationCenter.defaultCenter().addObserver(self, selector: "stopTimer", name: UIApplicationDidEnterBackgroundNotification, object: [])
    }

    func stopTimer() {
        println("Entered background!")
    }
}

```

When hitting the home button, the observer is never calling the selector, therefore my message is never being printed out.

Notice that I send an empty object at the end, the method signature for `addObserver` is expecting an implicitly unwrapped object and setting it to `nil` results in an `EXC_BAD_ACCESS` error when the app enters background.

Any ideas?

**EDIT**

I forgot to mention that this code is being executed from a framework included in my project.

Executing the code gives me a bad access abort signal.

![enter image description here](https://i.stack.imgur.com/MvTPT.png)