Apple 推送通知锁定 iPhone 4s 屏幕

发布于 2024-12-23 11:46:37 字数 179 浏览 2 评论 0原文

我有一个应用程序过去可以毫无问题地接受推送通知,但自从我升级到 4s 后,我注意到在应用程序不在前台时发送推送会锁定我的屏幕。当我发送推送时,我的手机屏幕会变成空白并出现旋转,然后锁屏键盘出现。有人知道为什么会发生这种情况吗?我的朋友在 ios4 上有 iphone 4,似乎推送得很好。这似乎是不可能的,因为它可能会被流氓应用程序开发人员滥用

I have an app that used to accept push notifications without any issues but since I upgraded to a 4s, I'm noticing that sending a push while the app is not in the foreground locks my screen. The moment I send the push, my phone's screen goes blank with a spinner and then the lock screen keyboard comes up. Anybody have any idea why this is happening? My friend who has a iphone 4 on ios4 seems to be getting the pushes fine. This seems like a something that should not even be possible because it could be abused by rogue app developers

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

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

发布评论

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

评论(1

っ〆星空下的拥抱 2024-12-30 11:46:37

我自己也遇到过这个。这就是正常警报的样子:

{
     "aps" : { "alert" : "This is the alert text", "badge" : 1, "sound" : "default" }
}

我发送了“声音”:“”并得到了与您完全相同的错误。如果您不想随消息一起发送声音,则根本不要发送声音位。

坏的:
{
"aps" : { "alert" : "这是警报文本", "badge" : 1, "sound" : "" }
}

好的:
{
"aps" : { "alert" : "这是警报文本", "badge" : 1 }
}

I just ran into this myself. This is what a normal alert looks like:

{
     "aps" : { "alert" : "This is the alert text", "badge" : 1, "sound" : "default" }
}

I was sending "sound":"" and got the exact same bug you were getting. If you do not want to send a sound with your message, don't send the sound bit at all.

bad:
{
"aps" : { "alert" : "This is the alert text", "badge" : 1, "sound" : "" }
}

good:
{
"aps" : { "alert" : "This is the alert text", "badge" : 1 }
}

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