推送通知特设工作,而不是从苹果商店下载的时候 [英] Push notifications work for Ad Hoc, but not when downloaded from the Apple store

查看:150
本文介绍了推送通知特设工作,而不是从苹果商店下载的时候的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的应用刚刚批准了苹果商店。我下载安装的它在我的iPhone - 但它看起来像推送通知被打破

我使用即席发放模板成功测试生产推送通知。我没有问题。当我提交到苹果我做不同的唯一的事情是使用一个应用程序商店分布曲线。

应用程序从不要求我(或其他人谁已经下载了它),如果我想收到推送通知。因此,手机从不跟我的服务器发送推送令牌(因为应用程序:didRegisterForRemoteNotificationsWithDeviceToken:是presumably永远不会被调用)。另外,应用程序不会出现在设置应用程序规定的通知设置。

还有什么我做错了?

编辑:当应用程序正在等待批准,我遇到了一些麻烦产生我的生产推送证书。难道这是相关的?

<一个href=\"http://stackoverflow.com/questions/2585667/problem-generating-apn-ssl-certificate-after-submitting-to-apple-store\">http://stackoverflow.com/questions/2585667/problem-generating-apn-ssl-certificate-after-submitting-to-apple-store


解决方案

确保您已经创建了生产的App ID并在其上启用推送通知。然后创建该应用的配置文件。下载并打开该文件文本编辑器必须确保配置文件包含此键和值:

APS-环境
生产

如果没有,那么请确保您生成的provisioning profile之前你真的已经启用生产推应用程序ID。

你让你的构建之后,您可以检查最终版本,以验证它拥有APS-环境的权利(你是内部要求下寻找APS-环境code签署授权):

codesign -dvvvv --entitlements - MyCoolApp.app <​​/ P>

My app just got approved for the apple store. I downloaded it an installed it on my iPhone - but it looks like push notifications are broken!

I was successfully testing push notifications in production using an adHoc provisioning profile. I had no problems. The only thing I did differently when I submitted to apple was using an app store distribution profile.

The application never asks me (or anyone else who has downloaded it) if I want to receive push notifications. Consequently, the phone never talks to my server to send the push token (because application:didRegisterForRemoteNotificationsWithDeviceToken: is presumably never called). Also the application does not appear in the settings app under the notification settings.

What could I be doing wrong??

EDIT: While the app was awaiting approval, I was having some trouble generating my production push certificate. Could this be relevant?

http://stackoverflow.com/questions/2585667/problem-generating-apn-ssl-certificate-after-submitting-to-apple-store

解决方案

Be sure you've created your production App ID and have enable push notifications upon it. Then create the provisioning profile for that app. Download and open the file with a text editor to MUST make sure that the profile contains this key and value:

aps-environment production

If not, then make sure you really have enabled the app ID for production push before you generated your provisioning profile.

After you make your build, you can check the final build to verify it has the aps-environment entitlement (you're looking for the aps-environment code signing entitlement under "Internal requirements):

codesign -dvvvv --entitlements - MyCoolApp.app

这篇关于推送通知特设工作,而不是从苹果商店下载的时候的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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