DrewDahlman / Phonegap-LocalNotification

An example of how to use the LocalNotification plugin for Phonegap
86 stars 48 forks source link

App crashing when canceling a notification #8

Closed thmr closed 11 years ago

thmr commented 11 years ago

Thanks for the great great plug in!

I had an small issue when canceling a notification. I was getting the following error and my app was crashing:

Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFNumber isEqualToString:]: unrecognized selector sent to instance 0x1dda1070'

Changing the following line in LocalNotification.m NSString *notificationId = [arguments objectAtIndex:0];

to

NSString *notificationId = [NSString stringWithFormat:@"%@",[arguments objectAtIndex:0]];

Seemed to resolve the issue.
I hope this helps.

DrewDahlman commented 11 years ago

The fix for this was just merged!