registerForRemoteNotificationTypes 导致应用程序立即退出

发布于 2024-08-30 14:16:06 字数 413 浏览 1 评论 0原文

我在 iPhone 上看到了这样的行为:在

[[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert];

调用调试器报告它已退出并显示消息

后,调试构建立即退出

响应 SpringBoard 的终止而终止。

在我的临时发行版构建中不会发生这种行为。谁能解释这种行为?

同样奇怪的是:当我进入应用程序的设置->通知时,它显示“关闭”,当我单击它时,页面是空白的 - 没有用于启用/禁用徽章、警报和声音的开关适用于所有其他应用程序。

I'm seeing behaviour on my iPhone where debug builds immediately exit after a call to

[[UIApplication sharedApplication] registerForRemoteNotificationTypes:UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeAlert];

The debugger reports it exited with the message

Terminating in response to SpringBoard's termination.

This behaviour doesn't happen on my ad hoc distribution builds. Can anyone explain this behavior?

Also weird: when I go to settings->notifications for my app, it says "off", and when I click on it, the page is blank - there are no switches to enable/disable badges, alerts, and sounds like there are for every other app.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文