【发布时间】:2018-08-22 13:42:34
【问题描述】:
我正在尝试在 iOS 应用程序上实现 静默推送通知,并且我遵循了适用于 iOS 的 Urban Airship Getting Started,但没有一个示例应用程序可以描述如何实现静默推送通知可以在 UAPushNotificationDelegate 上捕获。我创建了一个测试应用程序,它工作得很好。我目前正在收到简单的推送通知。
我一直在通过 CURLs 命令使用他们的 Push API 端点,它们运行良好。
我的目标是了解几件事:
- 如何创建自定义 Urban Airship 有效载荷以包含静默推送通知
({"aps":{"content-available" : 1}}) - 如何创建自定义操作
- 如何实现自定义操作的注册
- 如何在
UAPushNotificationDelegate 的
func receivedBackgroundNotification(_ notificationContent: UANotificationContent, completionHandler: @escaping (UIBackgroundFetchResult) -> Swift.Void)
我希望能够在我的应用程序上实现静默推送通知,我希望社区能帮助我这样做。以下是有关此事的参考 Apple 文档: https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/pushing_updates_to_your_app_silently
以下是其他 UA 客户提出的一些同样问题的问题: https://support.urbanairship.com/hc/en-us/community/posts/115011296606-Differentiate-silent-notifications-from-normal-push-notification https://support.urbanairship.com/hc/en-us/community/posts/360010098392-Custom-actions-while-app-in-background https://support.urbanairship.com/hc/en-us/community/posts/360000003566-Background-notifications-working-on-some-devices-but-not-on-others
【问题讨论】:
标签: ios push-notification urbanairship.com