简体   繁体   English

没有XC的XCode 6和Ad-Hoc分发:配置

[英]XCode 6 and Ad-Hoc distribution without XC: provisioning

Yesterday I've downloaded Xcode 6 and now I have got a problem I can't solve. 昨天我已经下载了Xcode 6,现在我遇到了一个我无法解决的问题。 In my member center I've got valid certificate and ad-hoc provisioning (distribution). 在我的会员中心,我获得了有效的证书和临时配置(分发)。 Till yesterday, in Xcode 5 if I wanted to add my .ipa to TestFlight I was using Archive and selecting my valid ad-hoc profile. 直到昨天,在Xcode 5中,如果我想将我的.ipa添加到TestFlight,我正在使用Archive并选择我有效的ad-hoc配置文件。 I wasn't even logged in in my developer account in Xcode. 我甚至没有在Xcode的开发者帐户中登录。

Now - in Xcode 6 - nothing is working at all. 现在 - 在Xcode 6中 - 什么都没有用。 Ok, I've logged in preferences, Xcode downloaded all my provisionings on Mac, but whenever I choose Export it says that I don't have matching provisioning profile and it's creating new provisioning profile with XC: prefix - which I don't want to use, because it contains all devices I have in member center - even those I don't want to include in my app! 好的,我已登录首选项, Xcode在Mac上下载了我的所有配置,但每当我选择导出时,它说我没有匹配的配置文件,并且它正在创建带有XC的新配置文件:前缀 - 我不想要使用,因为它包含我在会员中心的所有设备 - 即使是那些我不想包含在我的应用程序中的设备!

I was trying everything from this threads: 我正在尝试从这个线程的一切:

Xcode 6 - How to pick signing certificate/provisioning profile for Ad-Hoc distribution? Xcode 6 - 如何为Ad-Hoc分发选择签名证书/配置文件?

Xcode 6 GM creating archive Xcode 6 GM创建档案

but nothing is working for me. 但没有什么对我有用。 Maybe I don't understand correctly how it works and there is a trick I have to do but I would like to use provisioning profile defined by me. 也许我不能正确理解它是如何工作的,我必须要做一些技巧,但我想使用我定义的配置文件。 I was trying to create new provisioning profile, rename the old one, remove all from Mac, drag provisioing profile from desktop to Xcode icon, select correct Provisioning Profile in Build Setting all over again but I'm stuck. 我正在尝试创建新的配置文件,重命名旧的配置文件,从Mac中删除所有配置文件,将提供的配置文件从桌面拖到Xcode图标,再次在Build Setting中选择正确的配置文件,但我卡住了。

Screenshots here: 屏幕截图:

在此输入图像描述

在此输入图像描述

My Ad-hoc profile is distribution profile. 我的Ad-hoc配置文件是分发配置文件。

There is no way to get Xcode 6.x to use an ad-hoc profile that doesn't contain all of the devices on your team; 没有办法让Xcode 6.x使用不包含团队中所有设备的ad-hoc配置文件; this is by design. 这是设计的。

I have a workaround for this that works for me. 我有一个适合我的解决方法。

I have both Xcode 6 and Xcode 5.1.1 installed, Xcode 6 is in Applications and Xcode 5.1.1 is in another directory. 我安装了Xcode 6和Xcode 5.1.1,Xcode 6在Applications中,Xcode 5.1.1在另一个目录中。 When I want to do a build I use Xcode 6 to create the Archive. 当我想进行构建时,我使用Xcode 6来创建存档。 But you can also see the created Archive in Xcode 5.1.1 so I use Xcode 5.1.1 to distribute the Ad Hoc .ipa using the provisioning profile that I want to use. 但您也可以在Xcode 5.1.1中看到创建的存档,因此我使用Xcode 5.1.1使用我想要使用的配置文件分发Ad Hoc .ipa。 So build using Xcode 6 but distribute using Xcode 5.1.1. 所以使用Xcode 6构建,但使用Xcode 5.1.1进行分发。 It works for me. 这个对我有用。

Xcode6 will now always create a new AdHoc provisioning profile prefixed with 'XC' when you export an archive for testing (eg Hockey App). 当您导出用于测试的存档(例如曲棍球应用程序)时,Xcode6现在将始终创建一个以“XC”为前缀的新AdHoc配置文件。 In order to do this you must always have the latest App Store Distribution certificate and private key in your keychain. 为此,您必须始终在钥匙串中拥有最新的App Store Distribution证书和私钥。

NOTE: You do not have to have this latest distribution certificate selected in your provisioning profile you built the archive with. 注意:您不必在使用的构建配置文件中选择此最新分发证书。 Also keep in mind you do not need to have an AdHoc provisioning profile to export an AdHoc ipa. 另请注意,您无需使用AdHoc配置文件导出AdHoc ipa。

When you export the first time you will probably receive an error saying that you do not have an AdHoc provisioning profile with the following devices/people in it. 第一次导出时,您可能会收到一条错误消息,指出您没有AdHoc配置文件,其中包含以下设备/人员。 Just hit 'Try Again' and it will work. 只需点击“再试一次”即可。

Something else to keep in mind is that when exporting an ipa you are forced to test push notifications through their distribution/production servers as it is using the new self generated 'Distribution XC: AdHoc' provisioning profile. 要记住的其他事项是,在导出ipa时,您必须通过其分发/生产服务器测试推送通知,因为它使用新的自我生成的“Distribution XC:AdHoc”配置文件。

If you are using Urban Airship like we are you can no longer use development keys for testing. 如果您像我们一样使用Urban Airship,您将无法再使用开发键进行测试。 If you look under 'Entitlements' once you get through the steps to export it will show you that 'aps-environment' is set to 'production'. 如果您在完成导出步骤后查看“权利”,则会显示“aps-environment”设置为“production”。 If anyone finds an alternate solution for this let me know. 如果有人找到替代解决方案让我知道。

I was facing similar issue with my distribution license, and the problem was there was "XC" provisioning profile which had the exact same bundle id. 我的分发许可证面临着类似的问题,问题是“XC”配置文件具有完全相同的软件包ID。

My solution to his was to delete this XC: provisioning profile both from Apple Developer Portal and Xcode -> Preferences -> Apple ID -> View Details -> XC: provisioning profile -> right click Go To Finder -> delete 我的解决方案是从Apple Developer Portal和Xcode中删除这个XC:配置文件 - >首选项 - > Apple ID - >查看详细信息 - > XC:配置文件 - >右键单击Go To Finder - > delete

Hope this helps, 希望这可以帮助,

I encountered the same issue. 我遇到了同样的问题。 On one of the StackOverflow threads you linked to, a solution was recently added that worked for me. 在您链接到的StackOverflow线程之一上,最近添加了一个对我有用的解决方案

After you have created the archive, you can export it with a specific provisioning profile from the command line: 创建存档后,可以从命令行使用特定的配置文件导出它:

xcodebuild -exportArchive -archivePath "~/Library/Developer/Xcode/Archives/{some-date}/{appname date, time.xcarchive" -exportPath {appname} -exportFormat ipa -exportProvisioningProfile "{provisioning profile name}" xcodebuild -exportArchive -archivePath“〜/ Library / Developer / Xcode / Archives / {some-date} / {appname date,time.xcarchive”-exportPath {appname} -exportFormat ipa -exportProvisioningProfile“{provisioning profile name}”

Note that the provisioning profile name is just the name, without any path or file extension. 请注意,配置文件名称只是名称,没有任何路径或文件扩展名。

I ran into this today as well. 我今天也遇到了这个问题。

I ended up removing the XC profile from the developer portal and recreating my other ad-hoc and app store profiles and downloading them again. 我最终从开发人员门户中删除了XC配置文件,并重新创建了我的其他ad-hoc和app store配置文件并再次下载。

After I did this, when I built and tried to submit to app store, the correct App Store profile showed up AND when I went to export for ad-hoc, the correct ad-hoc profile showed up. 在我这样做之后,当我构建并尝试提交到应用商店时,正确的App Store配置文件出现了,当我去ad-hoc导出时,出现了正确的ad-hoc配置文件。

Yay ;) 好极了 ;)

I hit a similar problem and discovered that even if you specify the correct profiles in Xcode the Xcode6 system wants you to have the latest (from member centre) provisioning profile (for each team your account is against). 我遇到了类似的问题并发现即使您在Xcode中指定了正确的配置文件,Xcode6系统也希望您拥有最新的(来自会员中心)配置文件(对于您的帐户所针对的每个团队)。 It seems to walk each one in turn before using the one you need and gets blocked if you are absent any provisioning profile for the teams you belong to. 在使用您需要的那个之前,似乎依次走过每个人,如果您缺少所属团队的任何配置文件,则会被阻止。

I ran into this. 我碰到了这个。

No solution here worked. 这里没有解决方案。

I ended up moving to a command line build using nomad cli shenzen. 我最终使用nomad cli shenzen转向命令行构建。 Its another great open source project by mattt 它是mattt的另一个伟大的开源项目

Now I go into a shell and just type: 现在我进入shell并输入:

ipa build ipa构建

DONE DONE

They even have options to send the ipa to whatever Ad Hoc service you want. 他们甚至可以选择将ipa发送到您想要的任何Ad Hoc服务。 Awesome. 真棒。

In Xcode 6 (at least 6.1 I am using now)when you are doing the export for ad hoc, xcode 6 will automatically scan if there is any provisioning profile contains all devices registered in the developer account and at the same time match the bundle ID. 在Xcode 6中(我现在正在使用至少6.1)当您进行ad hoc导出时,xcode 6将自动扫描是否有任何配置文件包含在开发者帐户中注册的所有设备,同时与软件包ID匹配。 If no, it will use XC provision profile. 如果不是,它将使用XC提供配置文件。 Therefore, if you want to use your own profile, for example, for the purpose of push notification, you will need to select all devices in your profile on apple developer portal. 因此,如果您想使用自己的配置文件,例如,为了推送通知,您需要在Apple开发人员门户网站上选择配置文件中的所有设备。 I guess that's the reason why some people recreate profile would work and some wouldn't. 我猜这就是为什么有些人重新创建配置文件会起作用而有些人不会。

My way is much simpler: 我的方式更简单:
I go to the developer - provisioning profiles and re-create my Ad Hoc profile by choosing 'Edit' then 'Generate', download it and install with double-click. 我转到开发人员 - 配置文件并重新创建我的Ad Hoc配置文件,选择“编辑”,然后选择“生成”,下载并双击安装。 When exporting .ipa the correct (mine) profile is chosen. 导出.ipa时,选择正确的(我的)配置文件。
Apple only uses the last built provisioning profile, obviously. Apple显然只使用最后构建的配置文件。

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

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