推送通知仅适用于开发网关

时间:2016-10-13 15:39:21

标签: ios push-notification apple-push-notifications

我已尝试使用APN Tester Free进行推送通知 enter image description here

when I try gateway development the notifications are pushed correctly, this is the log
2016-10-13 15:34:21 +0000: Disconnected from server gateway.push.apple.com:2195 
2016-10-13 15:34:21 +0000: Accessing gateway: gateway.sandbox.push.apple.com 
2016-10-13 15:34:21 +0000: Connected to server gateway.sandbox.push.apple.com 
2016-10-13 15:34:21 +0000: Set SSL connection 
2016-10-13 15:34:21 +0000: Set peer domain name gateway.sandbox.push.apple.com 
2016-10-13 15:34:21 +0000: Keychain Opened  
2016-10-13 15:34:21 +0000: Certificate  data  for Apple Push Services: com.SoyPlus.SoyPlusPartner initialized successfully 
2016-10-13 15:34:21 +0000: Sec Identity created 
2016-10-13 15:34:21 +0000: Client certificate created 
2016-10-13 15:34:21 +0000: Connected 
2016-10-13 15:34:24 +0000: Token: <df11354b 3862f4fa 91cb260d 03375616 35662a44 91c09c23 7cb13b62 5e31157f> 
2016-10-13 15:34:24 +0000: Written 76 bytes sending data to gateway.sandbox.push.apple.com:2195 

2016-10-13 15:34:24 +0000: Disconnected from server gateway.sandbox.push.apple.com:2195 

然后弹出通知 enter image description here

但是现在,当我将网关更改为AdHoc / Production时,我没有获得推送通知,这是日志:

2016-10-13 15:35:01 +0000: Accessing gateway: gateway.push.apple.com 
2016-10-13 15:35:01 +0000: Connected to server gateway.push.apple.com 
2016-10-13 15:35:01 +0000: Set SSL connection 
2016-10-13 15:35:01 +0000: Set peer domain name gateway.push.apple.com 
2016-10-13 15:35:01 +0000: Keychain Opened  
2016-10-13 15:35:01 +0000: Certificate  data  for Apple Push Services: com.SoyPlus.SoyPlusPartner initialized successfully 
2016-10-13 15:35:01 +0000: Sec Identity created 
2016-10-13 15:35:01 +0000: Client certificate created 
2016-10-13 15:35:01 +0000: Connected 
2016-10-13 15:35:02 +0000: Token: <df11354b 3862f4fa 91cb260d 03375616 35662a44 91c09c23 7cb13b62 5e31157f> 
2016-10-13 15:35:02 +0000: Written 76 bytes sending data to gateway.push.apple.com:2195 

2016-10-13 15:35:02 +0000: Disconnected from server gateway.push.apple.com:2195 

如何解决此问题?我已尝试提供两种证书(开发和制作)

enter image description here

注意:我已修改Xcode代码签名身份

在:

enter image description here

后:

enter image description here

在我的iPhone上运行之后问题仍然存在,我是否需要在appstore中发布并从那里安装以进行全面测试?

1 个答案:

答案 0 :(得分:0)

要使用生产SSL证书,您的应用必须使用生产证书进行签名(在编译时)。 (如果您有企业程序,则用于AppStore或用于AdHoc部署的那个)

相关问题