Skip to content
New issue

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

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

Already on GitHub? # to your account

Silent notifications on iOS not working #567

Open
qwertycommander opened this issue Apr 19, 2021 · 3 comments
Open

Silent notifications on iOS not working #567

qwertycommander opened this issue Apr 19, 2021 · 3 comments

Comments

@qwertycommander
Copy link

It seems that silent notifications are not working for me on iOS.

I followed Apple's instruction by only providing an APNS payload of content-available, but they don't seem to get delivered.
#438 seems to have the same issue with no fix. When I provide a title, the APN gets delivered, but when it's omitted, it does not.

#438

@keremoge
Copy link
Contributor

I tried following request and you can check the APNS request below.
Can you share your gorush and APNS request?

request going gorush:

{
  "notifications": [
    {
      "platform": 1,
      "priority": "high",
      "tokens": [
        "**********4wAABp_BOYhKWWMLfSF9GV52UO_rYvBoKbQuuuI6HWSfLdG7_t-ZhA2_Zg47BpQbzBegmHUxovPTp3rU0xajPAfnz9IkOb**********"
      ],
      "content_available": true,
      "category": "CONFIRM",
      "sound": {
        "critical": 1,
        "name": "default",
        "volume": 1
      },
      "alert": {
        "body": "iOS UAT başarılı bildirim geldi"
      },
      "data": {
        "customerNo": 12345,
        "languageCode": "tr",
        "specificCharText": "denemee"
      }
    }
  ]
}

request going APNS:

{
  "aps": {
    "alert": {
      "body": "iOS UAT başarılı bildirim geldi"
    },
    "category": "CONFIRM",
    "content-available": 1,
    "sound": {
      "critical": 1,
      "name": "default",
      "volume": 1
    }
  },
  "customerNo": 12345,
  "languageCode": "tr",
  "specificCharText": "denemee"
}

@boma-digital
Copy link

boma-digital commented Jan 17, 2023

Hey @qwertycommander - I know this is some years old now but did you ever manage to find a payload that delivered silent messages to iOS devices reliably? Thanks!

@obuzyig
Copy link

obuzyig commented Jun 22, 2024

Hello everyone, I think it can be possible to manage background notifications with such kind of a payload, if application arranged for the related settings. There is not any text to be shown in the payload as the message. It can also be managed with the data elements in the list. (For instance, "xyz": "true" can be handled on the client side.) This are not fully required or mandatory fields, of course.

{
  "notifications": [
    {
      "tokens": [
        "Token"
      ],
      "platform": 1,
      "topic": "TOPIC_INFO",
      "push_type": "background",
      "content_available": true,
      "notif_id": "12345",
      "data": {
        "bkg": "true",
        "notif_id": "12345"
      }
    }
  ]
}

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

No branches or pull requests

3 participants