Today Extension Crashes before launching on iOS 8.1.2

本小妞迷上赌 提交于 2019-12-03 10:28:07

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".

Just experienced the same issue. For me, it was "Main Interface" property in "General settings" of the Keyboard target. It was blank, and i set it to my storyboard file and now it works like a charm.

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.

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

@objc(NotificationViewController)
class NotificationViewController: UIViewController, UNNotificationContentExtension {
...
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!