简体   繁体   English

发送带有easyAPNs状态的ios推送通知时出错(8:无效令牌)

[英]error sending ios push notifications with easyAPNs status(8: Invalid token)

After I set up easyAPNs and test it successfully on sandbox I got this problem on production when I try to process message queue: 在我设置easyAPN并在沙箱上成功测试后,当我尝试处理消息队列时,我在生产中遇到了这个问题:

Notice: APNS responded with command(8) status(8) pid(3). 注意:APNS以命令(8)状态(8)pid(3)响应。 1) APNS::__construct -> File: apns.php (line 34) 2) APNS::_fetchMessages -> File: class_APNS.php (line 232) 3) APNS::_iterateMessages -> File: class_APNS.php (line 404) 4) APNS::_pushMessage -> File: class_APNS.php (line 457) 5) APNS::_triggerError -> File: class_APNS.php (line 585) in /home/push/class_APNS.php on line 693 1)APNS :: __ construct - > File:apns.php(第34行)2)APNS :: _ fetchMessages - > File:class_APNS.php(第232行)3)APNS :: _ iterateMessages - > File:class_APNS.php(第404行) )4)APNS :: _ pushMessage - >文件:class_APNS.php(第457行)5)第693行/home/push/class_APNS.php中的APNS :: _ triggerError - >文件:class_APNS.php(第585行)

Fatal error: APNS responded with error for pid(3). 致命错误:APNS响应pid错误(3)。 status(8: Invalid token) 1) APNS::__construct -> File: apns.php (line 34) 2) APNS::_fetchMessages -> File: class_APNS.php (line 232) 3) APNS::_iterateMessages -> File: class_APNS.php (line 404) 4) APNS::_pushMessage -> File: class_APNS.php (line 457) 5) APNS::_triggerError -> File: class_APNS.php (line 591) in /home/push/class_APNS.php on line 693 status(8:无效令牌)1)APNS :: __ construct - > File:apns.php(第34行)2)APNS :: _ fetchMessages - > File:class_APNS.php(第232行)3)APNS :: _ iterateMessages - > File :class_APNS.php(404行)4)APNS :: _ pushMessage - > File:class_APNS.php(第457行)5)/ home / push / class_APNS中的APNS :: _ triggerError - > File:class_APNS.php(第591行)。 php在693线上

I double checked my production certificate and also generated a new one, but problem persists. 我仔细检查了我的生产证书,并生成了一个新证书,但问题仍然存在。 This error was posted on easyAPNs group but any solution was found. 此错误发布在easyAPNs组,但找到了任何解决方案。

I was having same issue and fix for me was to package the app with Distribution Provisioning certificate with option of Ad Hoc when archiving the app to install on your iOS device. 我遇到了同样的问题,修复我的问题是在将应用程序归档到iOS设备上时,使用分发配置证书和Ad Hoc选项打包应用程序。

I was able to test active & uninstall status of my devices in production mode after this step. 在此步骤之后,我能够在生产模式下测试设备的活动和卸载状态。

Hope this work for you too. 希望这也适合你。

If you are testing on multiple devices, make sure you use your production push certificate and change line 34 of class_APNS.php to: 如果您要在多个设备上进行测试,请确保使用生产推送证书并将class_APNS.php的第34行更改为:

private $DEVELOPMENT = 'production'; 

and line 98 to: 和98行:

private $certificate = 'file path to production ceritficate';

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

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