我们已经在Xamarin.ios原生应用程序中实现了APNS推送通知,当应用程序处于后台或终止状态时,它可以正常工作。我们无法在前台状态下获取通知。如何解决这个问题?有人能建议如何为这个实现c#代码吗
userNotificationCenter:(UNUserNotificationCenter*(中心将呈现通知
Xamarin.ios原生应用程序。请提供帮助/指导。
请参阅文档。
您可以拨打:
completionHandler(UNNotificationPresentationOptions.Alert | UNNotificationPresentationOptions.Sound | UNNotificationPresentationOptions.Badge);
in userNotificationCenter:(UNUserNotificationCenter* )center willPresentNotification
在前台时默认为UNNotificationPresentationOptions.None
,这通常是正常的,因为除非您的应用程序需要,否则您不想在应用程序在前台时显示推送通知。