swift-server-community / APNSwift

📱HTTP/2 Apple Push Notification Service built with swift - send push notifications to iOS, iPadOS, tvOS, macOS, watchOS, visionOS, and Safari!
Apache License 2.0
698 stars 105 forks source link

Add content-available option to alert #209

Closed hyouuu closed 2 months ago

hyouuu commented 2 months ago

Currently you can either send an alert or send a background notification, but often times apps want to be waken up while showing an alert so they can do background data fetch etc, so why not adding the option (surprised that nobody raised this question before)

hyouuu commented 2 months ago

Actually just found this regarding code execution should be dealt by a Notification Service Extension: https://developer.apple.com/forums/thread/745188 any ideas if that's actually the right approach and we shouldn't add content-available to alerts?

kylebrowning commented 2 months ago

YEs, reading that content-available only works for background pushes