Today Extension Crashes before launching on iOS 8.1.2

I fixed this issue by adding the @objc attribute to the Swift class.

@objc(NotificationViewController)
class NotificationViewController: UIViewController, UNNotificationContentExtension {
...
}

This error also occurs if you use NSExtensionPrincipalClass inside "Info.plist" in order to define a base class (instead of using a storyboard) with the name of a ViewController which does not exist.

When using Swift, make sure to prefix the class with the module name (usually the name of the target) like "Module.MyViewController".


Eventually I tried to remove NotificationCenter.framework from my target and put it back, cleaned the project, and it's now working again. I guess the framework wasn't properly linked after all, though I could see it on my target with xcode. Also, I can't figure out why it did work, then stopped working with the arrival of 8.1.2.