苹果改动了一点点东东,push sharp最近出问题了导致推送失败,原来要改一下代码

最近系统突然不能正常推送了,调试了几天,N次重新生成推送证书,得到提示

You have selected the Production server, yet your Certificate does not appear to be the Production certificate!  Please check to ensure you have the correct certificate!

打开pushsharp源码找到这句提示,然后在网上搜了一下,说是

找到函数CheckProductionCertificateMatching做如下改动

From

if (production && !subjectName.Contains("Apple Production IOS Push Services"))

To

if (production && !subjectName.Contains("Apple Push Services"))


苹果公司经常做改动的,做改动也可以理解,至少你做点兼容性也好啊。
相信iOS程序员都被折腾了,希望此文对大家有帮助
posted @ 2016-01-26 11:03  step  阅读(489)  评论(0编辑  收藏  举报