简体   繁体   English

APN和TestFlight:Xcode选择了错误的(XC *)配置文件来提交存档

[英]APN & TestFlight : Xcode chooses a wrong (XC*) provisioning profile to submit archive

I am using Parse.com to send client push notifications, from one iDevice to another. 我正在使用Parse.com将客户端推送通知从一个iDevice发送到另一个。

It works well with the 'development' setup, ie with - the Push Notification Setting of the appID set on 'Development' 它适用于“开发”设置,即-在“开发”上设置的appID的推送通知设置
- a development SSL certificate - a development provisioning profile With this setup, I managed to send a push notification to myself (sender = receiver = my device). -开发SSL证书-开发设置配置文件通过此设置,我设法向自己发送了推送通知(发送者=接收者=我的设备)。

Now I want to test the communication between 2 different devices. 现在,我想测试2个不同设备之间的通信。 To do so, I use TestFlight (because this is the way I usually send updates to my client). 为此,我使用TestFlight(因为这通常是我向客户端发送更新的方式)。 I followed all the recommended steps to move from Development to Ad Hoc : 我按照所有建议的步骤从“开发”转到“临时”:

  1. updated AppID settings to 'Production' Push Notifications 将AppID设置更新为“生产”推送通知
  2. created a production SSL certificate, uploaded it to Parse Server 创建了生产SSL证书,并将其上传到Parse Server
  3. generated a new Provisioning Profile set for Ad Hoc Development, and installed it on the iPhone (checked on Organizer Library). 为Ad Hoc Development生成了一个新的Provisioning Profile集,并将其安装在iPhone上(在Organizer Library中选中)。 This Ad Hoc Provisioning Profile is named : 'PushMyMoving_Push_Production_Profile' 该临时供应配置文件名为:“ PushMyMoving_Push_Production_Profile”
  4. updated the Project/Target build settings under 'Code Signing' to tell Xcode that it should use PushMyMoving_Push_Production_Profile (and the corresponding iPhone Distribution Certificate) for now on. 更新了“代码签名”下的“项目/目标”构建设置,以告知Xcode现在应该使用PushMyMoving_Push_Production_Profile(以及相应的iPhone发行证书)。

The issue : the build is successfully submitted, but as soon as it is, Apple sends me this e-mail : 问题:构建已成功提交,但Apple尽快将以下电子邮件发送给我: 提交后来自Apple的错误消息

And, naturally, I can no longer receive/send push notifications. 而且,自然地,我无法再接收/发送推送通知。 Here's what I tried so far : 这是我到目前为止尝试过的:

  1. I opened the PushMyMoving_Push_Production_Profile to see if the Push Notification Entitlement was missing. 我打开了PushMyMoving_Push_Production_Profile,以查看是否缺少“推送通知权利”。 It isn't. 不是。 So my guess is that Xcode doesn't submit/archive the build with the right Provisioning Profile, although I'm telling it to do so in the Build Settings ! 所以我的猜测是,尽管我在构建设置中告诉Xcode这样做,但Xcode并未使用正确的Provisioning Profile提交/存档该构建
  2. Actually, I noticed that whenever I submit the build, Xcode automatically selects a wildcard provisioning profile : 实际上,我注意到,每当提交构建时,Xcode都会自动选择一个通配符配置文件: Xcode生成的通配符配置文件
  3. I tried to delete all the wildcard provisioning profile from Member Center & my Mac, but (annoyingly!) Xcode automatically re-creates them whenever I refresh the Provisioning Profiles Panel under Xcode>Preferences>Accounts. 我试图从Member Center和Mac删除所有通配符配置文件,但是(烦人!)每当刷新Xcode> Preferences> Accounts下的Provisioning Profiles面板时,Xcode都会自动重新创建它们。 Is there a way to completely erase wildcard profiles ? 有没有办法完全删除通配符配置文件?
  4. This thread : XCode 6 and Ad-Hoc distribution without XC: provisioning suggests that it can be that the "ad-hoc profile doesn't contain all of the devices on your team" but I carefully checked ALL the devices I have when I generated the Ad Hoc profile. 此线程: XCode 6和不具有XC的Ad-Hoc分发:设置表明“临时配置文件可能不包含您团队中的所有设备”,但我仔细检查了生成时拥有的所有设备临时配置文件。
  5. I've also tried to edit & re-generate, re-install the provisioning profile (a common advice apparently) but Xcode still does it its way. 我也尝试过编辑和重新生成,重新安装配置文件(显然是一个常见建议),但是Xcode仍然这样做。

Any help would be much appreciated! 任何帮助将非常感激! I have been struggling for days, it is really frustrating when the problem does not come from the code ! 我已经努力了好几天,当问题不是源于代码时,这真令人沮丧! Thanks 谢谢

Thanks Rhythmic Fistman for the help. 感谢节奏拳手的帮助。 I found the answer today : I was submitting my build to TestFlight with an Ad-Hoc provisioning profile, instead of an AppStore Distribution Provisioning Profile. 今天我找到了答案:我提交我的生成与特设供应轮廓TestFlight,而不是AppStore的发行配置文件。 I had read somewhere that Xcode was creating a Ad-Hoc provisioning profile behind the scenes while submitting to TestFlight, so I thought that the Ad-Hoc profile was appropriate. 我曾读到某处Xcode在提交给TestFlight的同时在后台创建了Ad-Hoc配置文件,所以我认为Ad-Hoc配置文件是适当的。 But since TestFlight runs like the AppStore, not having registered the subscribed devices UDID in advance (as with Ad-Hoc distribution) it makes sense to use a "broader" profile such as an AppStore Distribution Provisioning Profile. 但是由于TestFlight像AppStore一样运行,并且没有预先注册订阅的设备UDID(与Ad-Hoc分发一样),因此使用“更广泛的”配置文件(如AppStore分发配置文件)是有意义的。

So for anyone using Push Notifications with Testflight, you do need an AppStore Distribution Provisioning Profile. 因此,对于将推式通知与Testflight一起使用的任何人,您都需要一个AppStore发行设置配置文件。 Then Xcode will automatically picks it for the submission phase. 然后Xcode将自动为提交阶段选择它。

Expunging wildcard provisioning profiles from Xcode and the developer portal can be done, but you can probably fix your problems by explicitly setting your Release Provisioning Profile to the correct Ad Hoc profile in your build settings: 可以从Xcode和开发人员门户中删除通配符配置文件,但是您可以通过在构建设置中将您的Release Provisioning Profile显式设置为正确的Ad Hoc配置文件来解决问题:

构建设置中的配置文件

This should stop Xcode getting too creative when Archiving. 这样可以避免Xcode在存档时变得太有创意。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM