如何在iOS上的节点上设置发送通知的到期时间? [英] How to set expiry on send notification with node on iOS?

查看:111
本文介绍了如何在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上的节点上设置发送通知的到期时间?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆