There are many crash logs collected when fire a local custom notification on watchOS.
But everything works fine in both real device and simulator tests.
Any suggestion thanks.
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXCCORPSENOTIFY
Triggered by Thread: 0
Related LevelUpNotificationController code:
But everything works fine in both real device and simulator tests.
Any suggestion thanks.
WatchKit: -[SPRemoteInterface registerInterfaceController:interfaceControllerID:interfaceControllerClientID:applicationRootController:] + 268
CRASH (SIGABRT)Exception Type: EXC
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXCCORPSENOTIFY
Triggered by Thread: 0
Related LevelUpNotificationController code:
Code Block swift class LevelUpNotificationController: WKUserNotificationInterfaceController { @IBOutlet var lblLvl: WKInterfaceLabel! override init() { super.init() } override func willActivate() { super.willActivate() } override func didDeactivate() { super.didDeactivate() } override func didReceive(_ notification: UNNotification, withCompletion completionHandler: @escaping (WKUserNotificationInterfaceType) -> Swift.Void) { print(">>> didReceive withCompletion") let userInfo = notification.request.content.userInfo if let lvl = userInfo["level"] as? Int { self.lblLvl.setText("\(lvl)") } completionHandler(.custom) } @available(watchOSApplicationExtension 5.0, *) override func didReceive(_ notification: UNNotification) { super.didReceive(notification) os_log(">>>didReceive: LevelUpNotificationController didReceive") let userInfo = notification.request.content.userInfo WKInterfaceDevice().play(.notification) if let lvl = userInfo["level"] as? Int { self.lblLvl.setText("\(lvl)") } } }