简体   繁体   English

无法接收iOS通知

[英]Can not receive ios notification

I want to send ios notification using APNS , but I have noticed that ony access token created by my mobile can recevice notification , while another token created by another devices cannot recieve notification . 我想使用APNS发送ios通知,但是我已经注意到由移动设备创建的ony访问令牌可以接收通知,而由其他设备创建的另一个令牌则无法接收通知。

For example I have install application in my development iphone and I can receive notifications , but in my another iphone ( Not for development ) I cannot receive any notification . 例如,我在开发iphone中安装了应用程序,并且可以接收通知,但是在另一部iphone(非开发)中,我无法接收任何通知。

When Im trying to send notifications to both devices at same time ( in parallel ), I cannot receive any notification in both devices . 当我尝试同时(并行)向两个设备发送通知时,我无法在两个设备中都收到任何通知。

But if send independent notification , only development device can receive. 但是如果发送独立的通知,则只有开发设备可以接收。

Phones themselves do not have a push "environment". 手机本身没有推送“环境”。

An app is either built enabled to operate with the development push environment or the production push environment (as a simplified summary - by default, an app built/installed via Xcode will be enabled for development pushes, while an app built and distributed as an .ipa outside of Xcode will be enabled for production pushes). 构建的应用程序可以与开发推送环境或生产推送环境一起使用(作为简化摘要-默认情况下,将启用通过Xcode构建/安装的应用程序进行开发推送,而将应用程序作为。 Xcode之外的ipa将启用生产推送)。

If the version of the app installed on the phone is built for the dev environment then pushes must be sent over the push environment and vice versa for production. 如果手机上安装的应用程序版本是为开发环境而构建的,则必须在推送环境上发送推送,反之亦然,以进行生产。 The Apple development environment gateway (also know as the sandbox gateway) which your server connects to will be for development: 服务器连接到的Apple开发环境网关(也称为沙箱网关)将用于开发:

ssl://gateway.sandbox.push.apple.com:2195 ssl://gateway.sandbox.push.apple.com:2195

While the production gateway is: 而生产网关是:

ssl://gateway.push.apple.com:2195 ssl://gateway.push.apple.com:2195

Thats some basics, as to your actual problem, you would need to: show your server code that is sending the pushes in parallel; 这就是一些基本知识,对于您的实际问题,您需要:显示并行发送推送的服务器代码; and indicate how you are installing the app on the phone which is not receiving pushes; 并指出您如何在未收到推送的手机上安装应用程序; and indicate how your server is getting the push tokens from the devices in order to diagnose your issue. 并指出您的服务器如何从设备获取推送令牌以诊断问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM