iOS 推送通知:应用程序在处于活动状态时如何收到有关推送通知的通知?
iOS push notification: How does an app get notified about a push notification, when it is in active state?
我有一个应用程序 运行 处于活动状态。突然收到推送通知,应用程序如何收到通知,如何处理?
您可以在 apple documentation.
中阅读相关内容
您需要在 AppDelegate 中使用 didReceiveNotificationRequest:withContentHandler:
。
之后您可以向用户显示通知。如果您想在活动状态下显示通知,您可以在应用程序中显示警报或使用系统横幅。
我有一个应用程序 运行 处于活动状态。突然收到推送通知,应用程序如何收到通知,如何处理?
您可以在 apple documentation.
中阅读相关内容您需要在 AppDelegate 中使用 didReceiveNotificationRequest:withContentHandler:
。
之后您可以向用户显示通知。如果您想在活动状态下显示通知,您可以在应用程序中显示警报或使用系统横幅。