Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2012/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios gateway.push.apple.com和api.push.apple.com之间的差异_Ios_Notifications_Apple Push Notifications - Fatal编程技术网

Ios gateway.push.apple.com和api.push.apple.com之间的差异

Ios gateway.push.apple.com和api.push.apple.com之间的差异,ios,notifications,apple-push-notifications,Ios,Notifications,Apple Push Notifications,gateway.push.apple.com和api.push.apple.com之间的确切区别是什么 我可以使用gateway.sandbox.push.apple.com发送测试通知 但是对于production gateway.push.apple.com不起作用api.push.apple.com是用于从APN发送通知请求的新api,但是gateway.push.apple.com仍在起作用不用担心XD,您只需确保完成有关已签名证书的所有流程,首先,按照从App Store Connec

gateway.push.apple.com和api.push.apple.com之间的确切区别是什么

我可以使用gateway.sandbox.push.apple.com发送测试通知
但是对于production gateway.push.apple.com不起作用

api.push.apple.com是用于从APN发送通知请求的新api,但是gateway.push.apple.com仍在起作用不用担心XD,您只需确保完成有关已签名证书的所有流程,首先,按照从App Store Connect下载的aps.cer执行以下步骤

# Convert the .cer file into a .pem file:
$ openssl x509 -in aps.cer -inform der -out PushChatCert.pem

# Convert the private key’s .p12 file into a .pem file:
$ openssl pkcs12 -nocerts -in PushChatKey.p12 -out PushChatKey.pem

# Finally, combine the certificate and key into a single .pem file
$ cat PushChatCert.pem PushChatKey.pem > ck.pem

# At this point it’s a good idea to test whether the certificate works.
$ telnet gateway.push.apple.com 2195

# Let’s try connecting again, this time using our SSL certificate and private 
key to set up a secure connection.
$ openssl s_client -connect gateway.push.apple.com:2195 -cert 
PushChatCert.pem -key PushChatKey.pem
不要忘记在生产中选择正确的API URL:gateway.push.apple.com 最重要的一点是,不要忘记此推送通知配置仅在应用程序为TestFlight或为开发人员发布时有效,您可以使用gateway.sandbox.Push.apple.com