推送通知已传递到Apple APNS服务器,但设备未收到任何通知 [英] Push notifications delivered to apple apns server but device received nothing

查看:580
本文介绍了推送通知已传递到Apple APNS服务器,但设备未收到任何通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

开发环境:

iOS 9.3.2(iPh6ne 6+)...但是它可以在iOS 8.x上运行

iOS 9.3.2 (iPh6ne 6+) ... but it works on iOS 8.x

Phonegap 6.2.7

Phonegap 6.2.7

Phonegap-plugin-push v1.7.2

Phonegap-plugin-push v1.7.2

PHP7(服务器端)- contentpush- ref

PHP7 (server side)- contentpush - ref

我的情况:

  1. 令牌已自动发送到我的服务器

  1. the token was delivered to my server automatically

消息已成功发送到ssl://gateway.push.apple.com 2195

message sent to ssl://gateway.push.apple.com 2195 successfully

设备甚至都没有收到警报(")

nothing received in device even alert("")

push.on('notification',function(data){ console.log(data.message); 警报(""); alert(data.title +消息:" + data.message); });

push.on('notification', function(data) { console.log(data.message); alert(""); alert(data.title+" Message: " +data.message); });

推荐答案

Apple对成功传递消息不提供任何保证. 您可以在此处看到相关的答案

Apple doesn't give any guarantee on successful message delivery. you can see related answer here

如果连接到网络后没有看到Apple推送通知,请与网络管理员联系以确保相关的TCP端口可访问.

If you're not seeing Apple push notifications when you're connected to a network, check with your network administrator to make sure related TCP ports are accessible.

要使用Apple推送通知服务(APN),您的Mac和iOS客户端需要与Apple服务器的直接持久连接.

To use Apple Push Notification service (APNs), your Mac and iOS clients need a direct and persistent connection to Apple's servers.

iOS设备尝试首先使用蜂窝数据连接到APN.如果该设备无法通过蜂窝连接连接到Apple的服务器,则它将尝试使用Wi-Fi连接.

iOS devices try to connect to APNs using cellular data first. If the device can't connect to Apple's servers over the cellular connection, it then tries to connect using Wi-Fi.

如果您在防火墙后面使用Wi-Fi或用于蜂窝数据的专用接入点名称(APN),则需要在以下端口上与APNs服务器进行直接,无代理的连接:

If you use Wi-Fi behind a firewall or a private Access Point Name (APN) for cellular data, you'll need a direct, unproxied connection to the APNs servers on these ports:

TCP port 5223: For communicating with Apple Push Notification services (APNs)
TCP port 2195: For sending notifications to APNs
TCP port 2196: For the APNs feedback service
TCP port 443: For a fallback on Wi-Fi only, when devices can't reach APNs on port 5223

APNs服务器使用负载平衡,因此您的设备将不会始终连接到相同的公用IP地址以进行通知.最好允许访问分配给Apple的整个17.0.0.0/8地址块上的这些端口.

The APNs servers use load balancing, so your devices won't always connect to the same public IP address for notifications. It's best to allow access to these ports on the entire 17.0.0.0/8 address block, which is assigned to Apple.

APN代表Apple Push Notification服务. APN代表接入点名称,它是蜂窝数据网络和Internet之间的网关.

APNs stands for the Apple Push Notification service. APN stands for Access Point Name, the gateway between a cellular data network and the Internet.

检查此链接以获取相同的解释

并检查 查看全文

登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆