iOS10 推送证书问题

来源:互联网 发布:数学分析 知乎 编辑:程序博客网 时间:2024/05/11 04:19
昨天提交了优化的项目之后,苹果官方给我发了一封邮件:


Dear developer,

We have discovered one or more issues with your recent delivery for "****". Your delivery was successful, but you may wish to correct the following issues in your next delivery:

Missing Push Notification Entitlement - Your app includes an API for Apple's Push Notification service, but the aps-environment entitlement is missing from the app's signature. To resolve this, make sure your App ID is enabled for push notification in the Provisioning Portal. Then, sign your app with a distribution provisioning profile that includes the aps-environment entitlement. This will create the correct signature, and you can resubmit your app. See "Provisioning and Development" in the Local and Push Notification Programming Guide for more information. If your app does not use the Apple Push Notification service, no action is required. You may remove the API from future submissions to stop this warning. If you use a third-party framework, you may need to contact the developer for information on removing the API.

After you’ve corrected the issues, you can use Xcode or Application Loader to upload a new binary to iTunes Connect.

Regards,

The App Store team



百度一下,大致说了修改推送证书,但还是一头的雾水啊,经过了一天的尝试之后,解决了,现在跟同猿们分享经验:
1.打开开发者网站 https://developer.apple.com/account,点击APP IDS





2.选择你的项目id,点击edit



3.进入之后红色部分为测试通知证书,蓝色部分为开发通知证书,这时候你需要的是开发通知证书,点击蓝色框里面的创建证书





4.点击continue




5.需要先生成证书文件


6.打开钥匙串,屏幕左上角的钥匙串访问-证书助理-从证书颁发机构请求证书...



7.红色部分填写你的开发帐号,名称随便填,记得选择存储到磁盘,继续之后就生成了一个证书文件了




8.选择你刚生成的文件,continue



9.这时候证书就配置完成了,删除钥匙串里的旧证书,重新下载,双击安装


10.最后一步,点击项目文件-capabilities-打开push notification




好了,这时候就可以重新提交项目了


选择你的项目id,点击edit
0 0