开发环境:
iOS 9.3.2(iPh6ne 6+)...但它适用于iOS 8.x
Phonegap 6.2.7
Phonegap-plugin-push v1.7.2
PHP7(服务器端) - contentpush - ref
我的情况:
令牌自动传递到我的服务器
消息已成功发送到ssl://gateway.push.apple.com 2195
设备甚至没有收到任何警报(“”)
push.on('notification',function(data){console.log(data.message); alert(“”); alert(data.title +“Message:”+ data.message);});
Development environment:
iOS 9.3.2 (iPh6ne 6+) ... but it works on iOS 8.x
Phonegap 6.2.7
Phonegap-plugin-push v1.7.2
PHP7 (server side)- contentpush - ref
My situation:
the token was delivered to my server automatically
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(""); alert(data.title+" Message: " +data.message); });
最满意答案
Apple不保证成功发送消息。 你可以在这里看到相关的答案
如果在连接到网络时没有看到Apple推送通知,请咨询您的网络管理员以确保可以访问相关的TCP端口。
要使用Apple推送通知服务(APN),您的Mac和iOS客户端需要与Apple服务器的直接持续连接。
iOS设备首先尝试使用蜂窝数据连接到APN。 如果设备无法通过蜂窝连接连接到Apple服务器,则会尝试使用Wi-Fi进行连接。
如果您在防火墙后面使用Wi-Fi或在蜂窝数据的私人接入点名称(APN)中使用Wi-Fi,则需要在这些端口上与APNs服务器建立直接的非代理连接:
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 5223APNs服务器使用负载均衡,因此您的设备不会始终连接到相同的公共IP地址以进行通知。 最好允许访问分配给Apple的整个17.0.0.0/8地址块上的这些端口。
APN代表Apple推送通知服务。 APN代表接入点名称,蜂窝数据网络和互联网之间的网关。
检查此链接的相同解释
并检查如何解决iOS上的推送通知问题?
Apple doesn't give any guarantee on successful message delivery. you can see related answer here
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.
To use Apple Push Notification service (APNs), your Mac and iOS clients need a direct and persistent connection to Apple's servers.
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.
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 5223The 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.
APNs stands for the Apple Push Notification service. APN stands for Access Point Name, the gateway between a cellular data network and the Internet.
check this link for same explanation
and also check for How do I troubleshoot issues with Push Notifications on iOS?
推送通知传递到苹果apns服务器,但设备收到什么(Push notifications delivered to apple apns server but device received nothing)开发环境:
iOS 9.3.2(iPh6ne 6+)...但它适用于iOS 8.x
Phonegap 6.2.7
Phonegap-plugin-push v1.7.2
PHP7(服务器端) - contentpush - ref
我的情况:
令牌自动传递到我的服务器
消息已成功发送到ssl://gateway.push.apple.com 2195
设备甚至没有收到任何警报(“”)
push.on('notification',function(data){console.log(data.message); alert(“”); alert(data.title +“Message:”+ data.message);});
Development environment:
iOS 9.3.2 (iPh6ne 6+) ... but it works on iOS 8.x
Phonegap 6.2.7
Phonegap-plugin-push v1.7.2
PHP7 (server side)- contentpush - ref
My situation:
the token was delivered to my server automatically
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(""); alert(data.title+" Message: " +data.message); });
最满意答案
Apple不保证成功发送消息。 你可以在这里看到相关的答案
如果在连接到网络时没有看到Apple推送通知,请咨询您的网络管理员以确保可以访问相关的TCP端口。
要使用Apple推送通知服务(APN),您的Mac和iOS客户端需要与Apple服务器的直接持续连接。
iOS设备首先尝试使用蜂窝数据连接到APN。 如果设备无法通过蜂窝连接连接到Apple服务器,则会尝试使用Wi-Fi进行连接。
如果您在防火墙后面使用Wi-Fi或在蜂窝数据的私人接入点名称(APN)中使用Wi-Fi,则需要在这些端口上与APNs服务器建立直接的非代理连接:
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 5223APNs服务器使用负载均衡,因此您的设备不会始终连接到相同的公共IP地址以进行通知。 最好允许访问分配给Apple的整个17.0.0.0/8地址块上的这些端口。
APN代表Apple推送通知服务。 APN代表接入点名称,蜂窝数据网络和互联网之间的网关。
检查此链接的相同解释
并检查如何解决iOS上的推送通知问题?
Apple doesn't give any guarantee on successful message delivery. you can see related answer here
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.
To use Apple Push Notification service (APNs), your Mac and iOS clients need a direct and persistent connection to Apple's servers.
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.
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 5223The 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.
APNs stands for the Apple Push Notification service. APN stands for Access Point Name, the gateway between a cellular data network and the Internet.
check this link for same explanation
and also check for How do I troubleshoot issues with Push Notifications on iOS?
发布评论