0
打印語句不通知的內容擴展裏面工作,雖然我能夠修改標籤文本等領域,下面是我的代碼無法調試notificaton內容擴展,在IOS 10通知
class NotificationViewController: UIViewController, UNNotificationContentExtension {
@IBOutlet weak var label: UILabel!
override func viewDidLoad() {
super.viewDidLoad()
print("inside viewDidLoad of notificationViewController")
}
func didReceive(_ notification: UNNotification) {
self.label?.text = notification.request.content.body
print("inside didReceive of notificationViewController")
}
}