iPhone推送通知随机发送

发布于 2024-09-27 12:37:39 字数 373 浏览 0 评论 0原文

我已经设置推送通知大约一年了,它们一直工作得很好。 现在由于某种原因他们不是。

首先我要说的是,我连接到苹果 apns 服务器并通过 PHP 脚本发送推送通知。

如果我测试仅向我的设备发送通知,它每次都会有效。 如果我测试向我这里的 3 或 4 个设备发送通知,它们都会正常工作。 如果我向所有用户(数百个)发送通知,有时我会收到通知,但大多数时候我不会收到通知。

我连接到苹果一次并从一个连接发送所有通知。所以这应该不是苹果连接限制的问题。

是否存在不允许您向几百个用户发送信息的限制?

它有几百个用户,通知可能每周只发送一次或两次。 我尝试过在每条消息之间设置时间延迟,但这似乎没有什么区别。

有谁知道可能发生什么或我应该检查什么?

I have had push notifications setup for about a year now and they have been working fine.
Now for some reason they are not.

First let me say that I am connections to apples apns servers and sending the push notifications via a PHP script.

If I test sending a notification just to my device, it works every time.
If I test sending a notification to 3 or 4 of the devices I have here, they all work like they should.
If I send a notification to all users (couple hundred) sometimes I will get the notifications and most of the time I wont.

I am connecting to apple once and sending all the notifications from the one connection. So it should not be an issue of apples connection limits.

Is there a limit that would not allow you to send to a couple hundred users?

Its a couple hundred users, the notifications only get sent out maybe once or twice a week.
I have tried setting a time delay between each message but that didn't seem to make a difference.

does anyone have any ideas what could be happening or what I should check?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

断爱 2024-10-04 12:37:39

你正在做任何错误检查吗?您使用的是“简单”还是“扩展”格式?您正在解析扩展格式的结果吗?您需要等待多长时间才能收到通知?您是否检测到 Apple 何时关闭连接?你检查反馈服务吗?

我认为您不应该使用(短暂的)PHP 脚本。苹果似乎没有在成功通知时向您发送任何内容,并且实际上没有另一种简单的方法来确保连接的另一端已接收(并处理)数据。

还值得检查您是否遵守iOS 开发者计划许可协议 第 22 页的推送通知要求(不得直接营销,不得过度使用)。

Are you doing any error checking? Are you using the "simple" or "extended" format? Are you parsing the result of the extended format? How long do you wait for the notifications to be received? Do you detect when Apple closes the connection? Do you check the feedback service?

I don't think you're supposed use a (short-lived) PHP script. Apple doesn't seem to send you anything on a successful notification, and there's not really another easy way to ensure that data has been received (and processed) by the other side of the connection.

It's also worth checking that you comply with the iOS Developer Program Licence Agreement Push Notification requirements on page 22 (no direct marketing, no excessive use).

屋顶上的小猫咪 2024-10-04 12:37:39

好的,我已经把一切都解决了。这是在我的服务器端,我有一个 cron 作业,修复后一切都开始工作,但无法正确运行 php 脚本,无需更改我的 PHP 脚本中的任何内容。

OK, I got it all sorted out. It was on my servers end, I had a cron job that was not running the php script correctly after fixing that everything started working, no need to change anything in my PHP scripts.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文