Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get iOS interactive notification to work #55

Open
brad opened this issue Aug 11, 2015 · 3 comments
Open

Can't get iOS interactive notification to work #55

brad opened this issue Aug 11, 2015 · 3 comments

Comments

@brad
Copy link

brad commented Aug 11, 2015

I copied/pasted the code from the README to create actions/categories, then registered like so:

pushPlugin.registerUserNotificationSettings(
    // the success callback which will immediately return (APNs is not contacted for this)
    function() {
        pushPlugin.register(tokenHandler, errorHandler, {
            "badge": false,
            "sound": true,
            "alert": true,
            ecb: ecbHandler
        });
    },
    // called in case the configuration is incorrect
    errorHandler,
    {
            // asking permission for these features
            types: [
                pushPlugin.UserNotificationTypes.Alert,
                pushPlugin.UserNotificationTypes.Sound
            ],
            // register these categories
            categories: [
                readCategory,
                otherCategory
            ]
    }
);

The message sent by the server looks something like this:

{"aps": {"alert": "Test alert", "category": "READ_CATEGORY"}}

I receive the notifications but they have no buttons. Can you see anything obvious that I'm doing wrong? I've set breakpoints in the native code and it looks like the categories are getting added. Is there anything else you could suggest I look at while debugging?
Thanks

@brad
Copy link
Author

brad commented Aug 13, 2015

@EddyVerbruggen Any advice for me?

@AntonDobrev
Copy link

@brad,

The payload looks correct. You may want to examine the category definition for readCategory and otherCategory and their actions. Also, are you running this on iOS8+?

@brad
Copy link
Author

brad commented Sep 1, 2015

@EddyVerbruggen I finally got around to revisiting this. I managed to get it working by commenting out lines 260 and 261 in PushPlugin.m. When those lines run my notifications don't have buttons. I must be doing something wrong, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants