我如何检查是否在iOS发行配置文件具有推送通知启用? [英] How do I check if an iOS distribution provisioning profile has push notifications enabled?

查看:145
本文介绍了我如何检查是否在iOS发行配置文件具有推送通知启用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有应该启用推送通知的应用程序,但由于某些原因没有他们。我见过其他人下载和安装应用程序,它甚至不提示他们的许可发送推送通知。正如预期的那样,这个程序不会出现在他们设置>通知。

I have an app which was supposed to have push notifications enabled, but for some reason doesn't have them. I've seen other people download and install the app, and it doesn't even prompt them for permission to send push notifications. As expected, this app doesn't appear in their Settings > Notifications.

但是,在我的iPad,我能够从这个应用程序接收推送通知,而且​​它出现在我的设置>通知。我已删除并重新安装应用程序,以确保我有其他人同样的事情有(而不是一个开发版本),我仍然能够得到通知。

However, on my iPad, I am able to receive push notifications from this app, and it does show up on my Settings > Notifications. I have deleted and reinstalled the app to make sure I had the same thing everyone else has (and not a development version), and I'm still able to get notifications.

现在,这个应用程序是为客户谁送我所有的资源调配配置文件(开发,计划外,分布)以及对能够发送推送通知所需的文件写的,所以我不能肯定知道这一切正确创建。

Now, this app was written for a client who sent me all the provisioning profiles (dev, adhoc, distribution) as well as the files needed to be able to send push notifications, so I can't know for sure that everything was properly created.

我的理论,现在是:


  • 我收到即席的个人资料被正确创建(即在配置门户上的应用程序的App ID设置的APN后生成)

  • 我收到分布曲线是为这个应用程序设置的APN 之前产生的(因此,它不是推启用)

  • 我能到我的设备上接收推送通知的原因是因为在开发过程中我安装了一个即席版本,这促使我要的权限收到推送通知,即使我已经删除此即席版和下载从商店的版本,设备已经缓存的事实,我愿意接收通知,不再提示我吧。我与其他应用程序和检查后确实我删除并重新安装它们,它们不会再提示我的权限来接收推送通知。

  • the adhoc profile I received was "properly created" (i.e. generated after setting up APNs on the app's App ID in the Provisioning Portal)
  • the distribution profile I received was generated before setting up APNs for this app (and thus, it's not "push enabled")
  • the reason I'm able to receive push notifications on my device is because during development I installed an adhoc version, which prompted me for permissions to receive push notifications, and even though I've deleted this adhoc version and downloaded the version from the store, the device has "cached" the fact that I'm willing to receive notifications and no longer prompts me for it. I've checked with other apps and indeed, after I delete and reinstall them, they won't prompt me again for permissions to receive push notifications.

所以我的问题是:


  • 请问这个理论意义?

  • 如果确实如此,这意味着我要问客户端生成一个新的发行配置文件。 如何可以验证该配置文件推启用?(即考虑到我不能只安装它编译的应用程序)

  • Does this theory make sense?
  • If it does, this means I'll have to ask the client to generate a new distribution provisioning profile. How can I verify that this profile is "push enabled"? (i.e. considering that I can't just install an app compiled with it)

推荐答案

好吧,我可能已经找到一种方法来验证配置文件是否没有启用推。

Ok, I may have found a way to verify whether or not the profiles have push enabled.

如果我打开文件名为.mobileprovision为文本文件,有一点XML的出现(一个很明显的plist),我猜的分布曲线应该有这样的:

If I open the .mobileprovision file as a text file, there is a bit of XML there (a plist apparently) which I'm guessing for a distribution profile should have this:

<key>aps-environment</key>
<string>production</string>

事实上,该计划外轮廓有这个和分配轮廓没有,所以......我猜这是问题。

And indeed, the adhoc profile had this and the distribution profile didn't, so... I'm guessing this was the problem.

不过,任何反馈将是有益的:)

Still, any feedback would be helpful :)

这篇关于我如何检查是否在iOS发行配置文件具有推送通知启用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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