推送通知不适用于分发 [英] Push Notifications wont work on distribution
问题描述
好的,现在推送通知有问题.我已经成功地为开发部分设置了它们,我正在我的设备上接收它们.现在我在应用程序商店有应用程序,但我无法接收通知.这是我所做的一步一步:
Ok now I have a problem with the push notifications. I have set them successfully for the developing part and I was receiving them on my device. Now I have the application on app store and I cant receave notifications. This is step by step what I did:
-我已经创建了一个用于分发的配置文件,并将其连接到具有分发和开发推送通知的应用程序 ID.
-I have created a provisioning profile for distribution and connected it to the app id that has push notifications for distribution and development.
-我已经使用该配置文件构建了用于分发的应用程序.
-I have built the app for distribution with that provisioning profile.
-我已在应用商店提交应用.
-I have submitted the app on app store.
-现在我在钥匙串访问 Apple Production IOS Push Service:AppID 和 iPhone Distribution:CompanyName 中有 2 个证书
-Now I have 2 certificates in keychain access Apple Production IOS Push Service:AppID and iPhone Distribution:CompanyName
-我已经从两者制作了 .pem 文件并用两者进行了测试.没有收到通知
-I have made .pem file from both and tested it with both. No notification has arrived
我真的不知道该尝试什么以及如何解决这个问题.
I really have no idea what to try and how to fix this.
推荐答案
几周前我也遇到过类似的问题.对我来说,情况是我在 xCode 中留下了几个配置文件.所以我需要做的是:
I have had similar problems, just a few weeks ago. For me the case was that I had several provisioning profiles left in xCode. So what I needed to do was:
- 转到管理器 -> 设备 -> 配置文件
- 为相关应用选择我的分发配置文件,然后将其删除.
- 前往 developer.apple.com/iOS
- 转到分发配置文件,对其进行修改.
- 只需点击全选"(这样我就可以重新保存它而不做任何更改),不知何故需要在启用推送证书后重新创建配置文件
- 下载新的配置文件并将其安装到 xCode
- 清理产品下的项目 -> 清理
现在我发布了一个新版本并对其进行了测试,结果奏效了.也许这也适用于您.
Now I made a new release and tested it and it worked. Maybe this workes for you as well.
编辑这个答案中的红线是,当应用程序中的推送通知被启用时,配置文件需要重新完成(即使在眼睛上没有任何变化).
Edit The red-thread in this answer is that when Push notification in the App is enabled, the provisioning profiles need to be re-done (even though, to the eye there are no changes).
这篇关于推送通知不适用于分发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!