chabokpush/chabok-demo-ios

-[PushClientManager userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:]: unrecognized selector sent to instance

Closed this issue · 1 comments

Hi,
Quite often we see app crash in AppDelegate with no reason.
I think this will happen after receiving some push notifications.

here is the log of crash

2017-12-17 17:13:59.682185+0330 shahrvand[8121:3137230] -[PushClientManager userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:]: unrecognized selector sent to instance 0x10bd123c0
2017-12-17 17:13:59.741200+0330 shahrvand[8121:3137230] invalid mode 'kCFRunLoopCommonModes' provided to CFRunLoopRunSpecific - break on _CFRunLoopError_RunCalledWithInvalidMode to debug. This message will only appear once per execution.
2017-12-17 17:14:04.737711+0330 shahrvand[8121:3137230] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[PushClientManager userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:]: unrecognized selector sent to instance 0x10bd123c0'
*** First throw call stack:
(0x1822b2364 0x1814f8528 0x1822bf828 0x1822b7a1c 0x18219cecc 0x104bd2a90 0x104bd2dc8 0x18ba080f8 0x18c419798 0x18c419674 0x18c1872dc 0x18c3203dc 0x18c18718c 0x18bf6b78c 0x18be0d2d4 0x184976ca4 0x1086f928c 0x1087059e4 0x1849aa7f8 0x1849aa49c 0x1849aaa38 0x18225a97c 0x18225a8fc 0x18225a184 0x182257d5c 0x182177e58 0x184024f84 0x18b7f767c 0x104bd42e4 0x181c9456c)
libc++abi.dylib: terminating with uncaught exception of type NSException

and this is my userNotificationCenter:didReceiveNotificationResponse:withCompletionHandler:

func userNotificationCenter(_ center: UNUserNotificationCenter,
                            didReceive response: UNNotificationResponse,
                            withCompletionHandler completionHandler: @escaping () -> Void) {
    let userInfo = response.notification.request.content.userInfo
    self.manager?.userNotificationCenter(center, didReceive: response, withCompletionHandler: completionHandler)
    completionHandler()
}

Dear @3pehrbehroozi
Thank you for the feedback, but this is the repository for chabokpush demo application.
Would you please create an issue in iOS SDK issue tracker?