parse-community / parse-community/parse-server-push-adapter

iOS Title property is not received when Alert property is a string

Open
#286 29 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
96
Forks
108
PR merge metrics
No merged PRs in 30d

Description

New Issue Checklist
Issue Description

iOS devices were only receiving the alert body. The alert title was not showing up. This is the payload I tested with.

const result = await Parse.Push.send(
    {
      where: pushQuery,
      // WORKS FOR ANDROID
      notification: {
        title: 'Android title',
        body: 'Android notification body',
      },
      sound: 'default',
      // WORKS FOR IOS
      data: {
        // alert: { title: 'iOS data alert title', body: 'iOS data alert body' }, // <-- this works, avoids the bug in the adapter code, and sets both title+body
        title: 'iOS data title',
        alert: 'iOS data alert', // <-- will overwrite the title key
        priority: '10',
        collapse_id: '1',
      },
    },
    {
      useMasterKey: true,
    }
  )
Steps to reproduce
  1. Configure project using FCM to send iOS push notifications.
  2. Send notification to an iOS device with the payload provided above.
Actual Outcome
  • Push notification is received, however the title was missing.
Expected Outcome
  • Should have received both title and alert message.
Environment
  • "@parse/push-adapter": "^6.5.0"
  • "parse-server": "~7.2.0"
Logs
  • not relevant, logs stated that push notification was sent successfully.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file or test is named. Start by reproducing the provided FCM payload with the listed Parse Server and push adapter versions, then trace the adapter's iOS payload handling when data.alert is a string. Done means an iOS notification retains both the supplied title and alert message.

Written by the indexing model from the issue text.

Assessment

Tech stack
firebase, javascript
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.