katzer / cordova-plugin-app-event

Cordova App-Event Plugin
Apache License 2.0
26 stars 23 forks source link

Crash for `didReceiveLocalNotification` #13

Closed SolveSoul closed 4 years ago

SolveSoul commented 7 years ago

This plugin looks great. However, I'm getting an error when opening a local notification.

When [self postNotificationName:CDVLocalNotification object:notification] is called from the method (void) swizzled_application:(UIApplication*)application didReceiveLocalNotification:(UILocalNotification*)notification in AppDelegate+APPAppEvent.m the app crashes (see log output below). Sometimes this output is not shown and the app just stops telling the debugger stopped with exit code 6.

Both parameters for postNotificationName are not nil

2017-09-15 13:15:26.937 Cordova Demo[732:233136] [15/09/17 13:15:26] :(32): Send content-event for (null) 2017-09-15 13:15:26.940 Cordova Demo[732:233136] Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: ' -[__NSPlaceholderDictionary initWithObjects:forKeys:count:]: attempt to insert nil object from objects[0]' *** First throw call stack: (0x25aea2eb 0x252b6dff 0x25a07e2b 0x25a07caf 0x603efb 0x5f0c2d 0x614353 0x9e7a9 0x25a9e9ed 0x25a9e3fb 0x25a9e1d1 0x25af2543 0x259ffa1b 0x2622fd47 0x2623487b 0x9b849 0x9b6f9 0x29f3098d 0x29f366a5 0x29f35d4f 0x29f35ca9 0x29f22123 0x29f21e11 0x26de099d 0x26dfbc75 0x26dfbf61 0x25aad257 0x25aace47 0x25aab1af 0x259fdbb9 0x259fd9ad 0x26c77af9 0x29ce9fb5 0x9b0b3 0x256b0873) libc++abi.dylib: terminating with uncaught exception of type NSException

Any ideas what's going on?