Skip to content

setBadgeNumber fails with expected parameters #17

Closed
drmike0099 opened this Issue Dec 6, 2012 · 1 comment

2 participants

@drmike0099

I'm using PG 2.2.0 and the latest UA plug-in. When I try to use the setBadgeNumber function like this:
push = window.pushNotification;
push.setBadgeNumber(count);

I get the following error in the Console:
[PushNotificationPlugin validateArguments:forExpectedTypes:] [Line 58] type mismatch in cordova callback: expected (
NSNumber
) and received (
2
)
(this was obviously for a submission for the variable 'count' of 2)

The way to make this work is to call it like the following:
push.setBadgeNumber(parseInt(count));

However, since count is a number, it seems like it should work without having to force the type, especially because JavaScript is loosely typed.

@rlepinski

Please file another issue if you are still experiencing this problem in the latest release.

@rlepinski rlepinski closed this Jul 31, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.