Skip to content

Not compatible with iOS 13 background push notifications #909

@AlexBrownShi

Description

@AlexBrownShi

What version of PushSharp are you using?

4.0.10.0

Describe your issue:

Background push notifications are not received by iOS 13 devices properly.

What are the steps required to reproduce this issue?

Send a background push notification by specifying: aps-content-available:1 and payload.

Please provide any Exception Stack Traces

No exception. Notification sends properly, but never received as a background notification. Possible it is received as a foreground notification, not sure.

See the following in iOS Notifications documentation:
https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/sending_notification_requests_to_apns

Excerpt on Headers:
apns-push-type :
(Required when delivering notifications to devices running iOS 13 and later, or watchOS 6 and later. Ignored on earlier system versions.) The type of the notification. The value of this header is alert or background. Specify alert when the delivery of your notification displays an alert, plays a sound, or badges your app's icon. Specify background for silent notifications that do not interact with the user. The value of this header must accurately reflect the contents of your notification's payload. If there is a mismatch, or if the header is missing on required systems, APNs may delay the delivery of the notification or drop it altogether. For information about configuring notification alerts, see Generating a Remote Notification. For more information about sending background notifications, see Pushing Background Updates to Your App.

I only see headers being used when using HttpTwo. If that is working, the fix may not be too complex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions