iPhone的iOS推送通知APNS生产不发送 [英] iPhone iOS push notifications apns on production not sending

查看:250
本文介绍了iPhone的iOS推送通知APNS生产不发送的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直对这个有一段时间了。
我知道有一吨的文章在那里,学到了很多关于它的一切。

I've been working on this for a while now. I know there's a ton of articles out there, and have learned a lot about it all.

我已经创建了我的开发和生产SSL的方式相同。
开发连接到SSL://gateway.sandbox.push.apple.com:2195
生产连接到SSL://gateway.push.apple.com:2195
连接似乎很好地工作。

I have created my development and production SSL's the same way. Development connects to ssl://gateway.sandbox.push.apple.com:2195 Production connects to ssl://gateway.push.apple.com:2195 The connections seem to work fine.

至于应用程序。
发展:
当我直接运行到我的设备从X code,它运行的开发版本。该应用程序成功地记录在数据库中的发展令牌。我然后运行一个服务来发送推送通知,并且正确交付。味精是成功交付。

As for the app. Development: When I run it directly on to my device from xCode, it runs the development version. The app successfully records the development token in the database. I then run a service to send a push notification, and it is delivered correctly. The msg is successfully delivered.

特设:
当我建立一个档案,并导出它特设的分布,我仔细检查包装内容 codesign -dvvvv --entitlements - Elepago.app <​​/ code>键,看到APS-环境正确设置生产。我将其打包,并通过iTunes将其加载到我的设备。当应用程序启动时,我看到记录在数据库中的新的生产令牌。因此,环境必须正确设置。当我发送推送通知到生产关键(相同的一样发展,只是改变了SSL质子交换膜键和服务器),它说,它已成功交付。然而,它从来没有真正到达设备!

Ad-hoc: When I build an archive and export it for Ad-hoc distribution, I double check the package contents codesign -dvvvv --entitlements - Elepago.app and see that the aps-environment is correctly set to production. I package it and load it onto my device through iTunes. When the app starts, I see the new production token recorded in the database. So the environment must be correctly set up. When I send the push notification to the production key (identically the same as development, just changing the SSL .pem key and the server), it says it is successfully delivered. However it never actually reaches the device!!!

这问题快把我逼疯了。我刚刚经历了和清理我的分布证书,并使用了全新的CSR重建它。我也更新了所有的资源调配配置文件来使用新证书。 [任何想法这些证书是如何扎入的应用程序,比对APS-环境件事我已经检查等。]

This problem is driving me crazy. I just went through and cleaned out my distribution certificate and rebuilt it using a completely new CSR. I also updated all the provisioning profiles to use that new certificate. [Any ideas how these certificates tie into the app, other than for the aps-environment thing which I already check.]

任何有识之士将大大AP preciated。

Any insight would be greatly appreciated.

推荐答案

于是小时,头痛小时后,我结束了重建SSL .pem文件和它的工作!

So after hours and hours of headaches, I ended up rebuilding the SSL .pem file and it worked!!

下面是我所做的:


  • 擦干净我的分发证书,并创建了一个新

  • 相关联的所有资源调配配置文件,以新的证书

  • 在X code的装填了新的资源调配配置文件

  • 重建继的 Raywenderlich的真棒教程

  • wiped clean my distribution certificate and created a new one
  • associated all provisioning profiles to new certificate
  • loaded up new provisioning profiles in xCode
  • rebuilt my SSL handshake .pem file following instructions on Raywenderlich's awesome tutorials

这是我原先遵循开发与生产相同的指令,但也许/显然乱七八糟的东西了。然后,我测试了我的临时版本,它的工作!

These are the same instructions I had originally followed for development and production, but maybe/apparently messed something up. Then I tested on my ad-hoc version and it worked!!!

此外,它值得注意的是,使用了错误的质子交换膜键时,我没有收到任何APNS误差反馈。我使用的链接中找到的simplepush.php文件之上为基地,以发送PN

Also, its worth noting that when using the wrong .pem key, I was not receiving any error feedback from APNS. I use the simplepush.php file found in the link above as a base to send the PN.

这篇关于iPhone的iOS推送通知APNS生产不发送的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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