gpt4 book ai didi

ios - PushSharp Push 在停止之前不会处理队列

转载 作者:塔克拉玛干 更新时间:2023-11-01 19:10:45 24 4
gpt4 key购买 nike

PushSharp 仅在调用停止时处理队列。有谁知道 push sharp 处理队列或刷新队列的频率?我不想每次发送通知时都调用 stop 和 start 来节省资源。

            pushService = new PushService();
pushService.StartApplePushService(new ApplePushChannelSettings(prod, cert.InputStream.ReadToEnd(), passConfig.Value));
pushService.QueueNotification(
NotificationFactory.Apple().ForDeviceToken("mydeviceid").WithAlert("Notifications Started!").WithSound("default").WithBadge(7));


pushService.StopAllServices(true);

最佳答案

我是个彻头彻尾的白痴...

在队列计时器可以处理通知之前,主线程已完成执行。 StopAllServices 强制线程等待...也许这会对其他人有所帮助。

关于ios - PushSharp Push 在停止之前不会处理队列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13764900/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com