如何在iOS上的节点上设置发送通知的到期时间?

编程入门 行业动态 更新时间:2024-10-24 01:53:43
本文介绍了如何在iOS上的节点上设置发送通知的到期时间?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

这是我发送iOS通知的功能,但是如果设备处于脱机状态,则在连接后,

它没有收到通知.我已经尝试了很多方法来实现这一目标,请帮助!

解决方案

请告知我们以下示例是否可以帮助您设置设备到期的TTL值. /p>

var namespaceManager = NamespaceManager.CreateFromConnectionString("connectionstring"); NotificationHubDescription hub = namespaceManager.GetNotificationHub("foo"); hub.RegistrationTtl = TimeSpan.MaxValue; namespaceManager.UpdateNotificationHub(hub);

this is my function to send iOS notifications, but if the device is offline, after it gets connection,

it does not receives the notification. I have tried so many ways to achieve that, please Help!

解决方案

Please let us know if the below sample would help you to set the TTL value for your device expiry.

var namespaceManager = NamespaceManager.CreateFromConnectionString("connectionstring"); NotificationHubDescription hub = namespaceManager.GetNotificationHub("foo"); hub.RegistrationTtl = TimeSpan.MaxValue; namespaceManager.UpdateNotificationHub(hub);

更多推荐

如何在iOS上的节点上设置发送通知的到期时间?

本文发布于:2023-11-17 08:17:30,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1609438.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:节点   通知   时间   如何在   iOS

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!