仅在后台接收iOS生产推动通知

发布于 2025-02-12 14:52:48 字数 946 浏览 2 评论 0原文

我的环境:

"react-native": "0.63.4",
"react-native-push-notification": "7.3.1",
"@react-native-community/push-notification-ios": "^1.8.0",

在Xcode中打开远程通知 背景模式 push Notifications服务

ios> ios  > 。

simple&简单的通知服务

我尝试过的内容:

我已经创建了两个APN证书,均使用Apple Push Notification Service Ssl(SandBox& Production)

用于沙盒环境的其中一个是成功接收前景/背景通知。

但是,在使用我的生产证书时,我只是在后台收到推送通知。 实际上,我确实通过在Naver Cloud Platform设置中删除和重新上传生产证书来解决此问题,而iOS应用程序开始在前景模式下接收生产中的推送通知。 然后,在某个时刻,推送通知再次进入前景模式,而只是背景。

尝试调试,在此期间,我几次构建并发布了iOS应用程序,但没有更改任何云平台配置以及源代码。

尝试撤销现有的生产证书,将证书重新上传到云服务,但没有用。

我的演绎推理是,如果NAVER云平台设置以及服务器环境和Objective-C代码处理前景推送通知都是正确的,因为我至少在开发环境中收到通知仅模式。

我可能会错过或应该检查其他东西吗?

My environment:

"react-native": "0.63.4",
"react-native-push-notification": "7.3.1",
"@react-native-community/push-notification-ios": "^1.8.0",

in xCode turned on remote notifications in Background Modes and enabled Push Notifications Service

iOS .entitlements configuration is automatically set to production when the app is built with Xcode and deployed

Utilizing Naver Cloud Platform’s Simple & Easy Notification Service

What I've tried:

I have created two APNs certificates both with Apple Push Notification Service SSL (Sandbox & Production).

The one of them which is used for sandbox environment is successfully receiving foreground/background notifications.

But while using my production certificate, I'm only receiving push notifications while in background.
I did actually resolve this issue by deleting and re-uploading production certificate in the Naver Cloud Platform settings and the iOS app started receiving push notifications in production in the foreground mode.
Then at some moment, push notifications stopped coming in foreground mode again but only background.

Tried debugging, during that period I built and published the ios app several times but didn’t change any cloud platform configuration as well as the source code.

Tried revoking existing production certificates, re-uploading certificates to the cloud service but it didn't work.

My deductive reasoning is that if the Naver Cloud Platform settings along with the server environment and Objective-C code to handle foreground push notifications are all correct since I’m receiving notifications at least in dev environment: foreground/background and at least in production background mode only.

Is there something else I might have missed or should be checking?

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

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

发布评论

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