GithubHelp home page GithubHelp logo

Comments (6)

eladnava avatar eladnava commented on August 23, 2024

Hi @RoyDeng,

  1. iOS Silent Notifications require the Background Modes -> Remote Notifications capability to be enabled. Please ensure this capability is enabled in your Xcode project settings, and try sending a silent notification with contentAvailable: true again.

  2. Please ensure your app has not been swiped away (killed) as this will prevent silent notifications from waking up your app (this is an Apple iOS platform restriction).

  3. If testing using the Xcode debugger, please note that the debugger won't break on didReceiveRemoteNotification:fetchCompletionHandler if your app is not in foreground when a silent notification comes in.

from node-gcm.

RoyDeng avatar RoyDeng commented on August 23, 2024

Thanks for your response.
I would like to confirm that this setting is equivalent to content-available: 1 in notification?
Also, I enabled remote notifications capability in the background Modes, it still doesn't work.

from node-gcm.

eladnava avatar eladnava commented on August 23, 2024

Hi @RoyDeng,
Yes, setting contentAvailable: true will lead to content-available: 1 being passed to the APNs server and a silent notification being sent.

Please confirm items 2 and 3 are not the cause as well (app not killed/not being debugged in background).

from node-gcm.

RoyDeng avatar RoyDeng commented on August 23, 2024

I have solved the problem, thanks.

from node-gcm.

eladnava avatar eladnava commented on August 23, 2024

from node-gcm.

RoyDeng avatar RoyDeng commented on August 23, 2024

Hi, I found that I also use didReceive and didReceiveRemoteNotification at the same time. Based on the life cycle, it does not call the function I expect.

from node-gcm.

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.