Giter Club home page Giter Club logo

Comments (4)

butterfly-thomasdittmar avatar butterfly-thomasdittmar commented on May 30, 2024

UPDATE

Since there is no error output I had to find a way to print/return the error.

I went to the following file node_modules/node-pushnotifications/lib/sendAPN.js and modified the code so I get error msg's

(response.failed || []).forEach(function (failure) {
            resumed.failure += 1;
            resumed.message.push(response.failed)
            // if (failure.error) {
            //     // A transport-level error occurred (e.g. network problem)
            //     resumed.message.push({
            //         regId: failure.device,
            //         error: failure.error
            //     });
            // } else {
            //     // `failure.status` is the HTTP status code
            //     // `failure.response` is the JSON payload
            //     resumed.message.push({
            //         regId: failure.device,
            //         error: new Error(failure.response.reason || failure.response)
            //     });
            // }
        });

That produced the following return msg

[{"method":"apn","success":0,"failure":1,"message":[[{"device":"e90356be05f7296006a5d30232b30a5b4dcf580b83254ee0e27cab0328f228cd","status":"400","response":{"reason":"MissingTopic"}}]]}]

After adding topic: '<bundle identifier>' to the data I can finally send PN to production. That means that TOPIC is needed in production!!!!

from node-pushnotifications.

alex-friedl avatar alex-friedl commented on May 30, 2024

@butterfly-thomasdittmar yes topic is required, as can be seen in the documentation here https://github.com/appfeel/node-pushnotifications#apn
Hope everything works fine now?

from node-pushnotifications.

butterfly-thomasdittmar avatar butterfly-thomasdittmar commented on May 30, 2024

Hi @alex-friedl,

Yes, everything works fine now.

As a suggestion, can you add topic: '', // REQUIRED for apn and gcm for ios into this section of the HOW-TO

from node-pushnotifications.

alex-friedl avatar alex-friedl commented on May 30, 2024

Good point. Made the change in #68

from node-pushnotifications.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.