iOS APNS应用程序和应用程序剪辑通用通知主题

发布于 2025-01-31 03:04:34 字数 344 浏览 4 评论 0原文

我为我的应用程序设置了推送通知,它是相应的应用程序剪辑。假设该应用具有appid,com.x,并且应用程序夹具有ID com.x.clip。

我将APS的主题设置为com.x.clip,以将推送通知发送到我的应用程序剪辑,并且可以正常工作。但是,当我尝试将推送通知发送到我的应用程序时,我会收到错误DeviceTokenNotFortopic,因为设备令牌是用于AppClip而非应用程序的。将主题修复到com.x,解决问题。

我的问题是,有没有办法将主题设置为我的应用程序和AppClip可以共享的常见事物,以免收到这些错误?否则,我还必须存储哪些设备令牌适用于应用程序,哪些是用于剪辑的,这将增加存储成本。

也许还有另一种方式?

I have push notifications setup for my app and it’s corresponding App Clip. Let’s say that the App has an AppID, com.X and the App Clip has the ID com.X.Clip.

I set the topic of the aps to com.X.Clip to send push notifications to my App Clip and it works properly. However, when I try to send push notifications to my App, I get the error DeviceTokenNotForTopic because the device token is for the AppClip and not for the app. Fixing the topic to com.X, solves the problem.

My question is, is there a way to set the topic to something common that can be shared by my App and the AppClip so that I don’t receive these errors? Otherwise I would have to also store which device tokens are for the app and which are for the clip which will increase storage costs.

Or perhaps there is another way?

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

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

发布评论

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

评论(1

梅倚清风 2025-02-07 03:04:34

不确定您是否弄清楚了,但是我只是在这里问了一个类似的问题:我如何检测iOS应用程序剪辑或通用链接正在运行?

您无法组合它们,但是您可以告诉您的服务器在哪里注册设备令牌。

Not sure if you figured it out, but I just asked a similar question here: How do I detect whether an iOS App Clip or Universal Link is running?

You can't combine them, but you can tell your server where to register the device token.

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