Skip to content

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

Open
@chadpav

Description

@chadpav

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions