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
693 stars 105 forks source link

Add content-available option to alert #209

Closed hyouuu closed 1 month ago

hyouuu commented 1 month 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 1 month 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 1 month ago

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