如何使用具有单独应用程序 ID 的精简版获取 iPhone 推送通知

发布于 2024-10-19 13:50:17 字数 244 浏览 6 评论 0原文

我正在努力创建当前应用程序的“精简版”,但我想知道实现推送通知的最佳方法,以便它们在精简版和付费版本上都能工作。在 xcode 中,我复制了原始目标,并使用预处理器代码对精简版进行了更改,但现在不确定如何为精简版设置推送通知。我目前有适用于我的付费版本的推送通知,但不确定如何让它们适用于精简版,以便精简版用户可以向付费用户发送通知(据我所知,因为精简版和付费版都有单独的应用程序 ID,我需要单独的推送证书?)?

任何正确方向的帮助或指导将不胜感激。谢谢!

I'm working on creating a "lite" version of my current app but am wondering the best way to implement the push notifications so that they work on both the lite version and the paid version. In xcode I duplicated the original target and have made my changes for the lite version using preprocessor codes but am now not sure how to setup the push notifications for the lite version. I currently have push notifications working for my paid version but am not sure how to get them to work for the lite version so that lite users can send notifications to paid users (it is my understanding that since both the lite version and the paid version have separate app ids that I will need separate push certificates?)??

Any help or guidance in the right direction would be greatly appreciate. Thanks!

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

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

发布评论

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

评论(1

梦里泪两行 2024-10-26 13:50:17

如果您的应用程序有不同的 AppId,那么您需要使用不同的推送证书将消息推送到不同的应用程序,这是正确的。原因是推送证书是在 AppId 级别配置/启用的,并且不会在不同 AppId 之间重用。

在您描述的场景中,您需要确定哪些用户来自应用程序的精简版和“付费”版本。基于这种区别,您将能够确定在与 Apple 推送服务通信时使用哪个推送证书。

If your application's have different AppIds, then you are correct that you will need to use different push certificates to push messages to the different applications. The reasoning is that the push certificates are configured/enabled at the AppId level and are not reused between different AppIds.

In the scenario you described, you will need to identify which users are coming from the Lite version of the application versus the 'Paid' version. Based on that distinction, you will be able to determine which push certificate to use when communicating with Apple's push services.

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