[英]Xcode 6 - How to pick signing certificate/provisioning profile for Ad-Hoc distribution?
To distribute the app to our testers we use Xcode, which we do using the following process: 要将应用程序分发给我们的测试人员,我们使用Xcode,我们使用以下过程:
But with Xcode 6 , this workflow was changed a bit. 但是使用Xcode 6 ,这个工作流程发生了一些变化。 I can still select the Ad-Hoc distribution option, but I cannot select the provisioning profile I want. 我仍然可以选择Ad-Hoc分发选项,但我无法选择我想要的配置文件。 This gives us no control over which signing certificate is used and the provisioning profile configuration (we use push notifications). 这使我们无法控制使用哪个签名证书和配置文件配置(我们使用推送通知)。
By default iPhone distribution
signing identity is used and some kind of XC Ad Hoc
provisioning profile is generated, which can be seen on image below: 默认情况下,使用iPhone distribution
签名身份并生成某种XC Ad Hoc
配置文件,如下图所示: If you click the arrow near provisioning profile, it opens the folder with provisioning profiles. 如果单击配置配置文件附近的箭头,则会打开包含配置配置文件的文件夹。
So my question is: 所以我的问题是:
Is there any way in Xcode 6 to select the provisioning profile used with Ad Hoc distribution? Xcode 6中是否有任何方法可以选择Ad Hoc分发使用的配置文件?
Thanks! 谢谢!
I was facing same issue, resolved using command line "xcodebuild" tool script, which is preinstalled with XCode6 (didn't need to re-install XCode5). 我遇到了同样的问题,使用命令行“xcodebuild”工具脚本解决,该脚本预装了XCode6(不需要重新安装XCode5)。
http://www.thecave.com/2014/09/16/using-xcodebuild-to-export-a-ipa-from-an-archive/ http://www.thecave.com/2014/09/16/using-xcodebuild-to-export-a-ipa-from-an-archive/
Script in terminal: 终端脚本:
xcodebuild -exportArchive -archivePath $projectname.xcarchive -exportPath $projectname -exportFormat ipa -exportProvisioningProfile 'Provisioning Profile Name'
I had a similar issue when submitting to The App Store. 提交到App Store时,我遇到了类似的问题。 I created an archive, then clicked "submit" and Xcode wanted to automatically sign with the default "XC com.*" wildcard provisioning profile instead of the explicit profile that already had. 我创建了一个存档,然后单击“提交”,Xcode想要使用默认的“XC com。*”通配符配置文件自动签名,而不是已经拥有的显式配置文件。
To fix this, I just re-generated the profile on the Apple Developer Portal: 为了解决这个问题,我只是在Apple Developer Portal上重新生成了配置文件:
1) Go to developer.apple.com and find the distribution provisioning profile you want to use. 1)转到developer.apple.com并找到要使用的分发配置文件。
2) Select it, click "Edit", re-name the profile, and click "Generate". 2)选择它,单击“编辑”,重命名配置文件,然后单击“生成”。
3) Download the provisioning profile to the Desktop and drag it onto the Xcode 6 icon. 3)将配置文件下载到桌面并将其拖到Xcode 6图标上。
4) Re-start Xcode 6. 4)重新启动Xcode 6。
5) Open the organizer window and click "Submit" on the archive you built. 5)打开管理器窗口,然后在您构建的存档上单击“提交”。 Xcode will automatically pick your explicit profile instead of the generic one. Xcode会自动选择您的显式配置文件而不是通用配置文件。
Once you are in Organizer 进入组织者后
Of course you need to have generated, downloaded and installed the ad-hoc provisioning profile. 当然,您需要生成,下载和安装ad-hoc配置文件。
It seems the last generated provisioning profile wins right now. 似乎最后生成的配置文件现在获胜。 So you can just re-generate the profile you want and download it and Xcode will use it. 因此,您可以重新生成所需的配置文件并下载它,Xcode将使用它。
A slightly better approach: set the desired prov profile in your target and use the command line to build your ipa, that works, too. 一种更好的方法:在目标中设置所需的prov配置文件,并使用命令行构建您的ipa,这也是有效的。
Here is the script, I'm using: 这是脚本,我正在使用:
#!/bin/sh
# Current as working as of 2014/09/22
# Xcode 6
OUTPUTDIR="$HOME/build"
APPNAME="your-app"
SCHEME="your-app"
APP_WORKSPACE="$HOME/Path/To/your-app.xcworkspace"
rm "$OUTPUTDIR/$APPNAME.ipa" #deletes previous ipa
xcodebuild -workspace "$APP_WORKSPACE" -scheme "$SCHEME" archive -archivePath "$OUTPUTDIR/$APPNAME.xcarchive"
xcodebuild -exportArchive -exportFormat ipa -archivePath "$OUTPUTDIR/$APPNAME.xcarchive" -exportPath "$OUTPUTDIR/$APPNAME.ipa"
and my settings: 和我的设置:
I couldn't figure this out either - got bit by it when submitting to the AppStore, where it defaulted to a wildcard profile. 我也无法解决这个问题 - 在提交到AppStore时,它被默认为通配符配置文件。
I ended up building in Xcode 6, then going back to Xcode 5's Organizer window for the submission. 我最终在Xcode 6中构建,然后回到Xcode 5的Organizer窗口进行提交。 That way it'll prompt you to pick a profile to sign with. 这样它会提示你选择一个配置文件来签名。
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. 我猜这就是为什么有些人重新创建配置文件会起作用而有些人不会。
btw,use script can export and upload to testflight, but device just can't download it. 顺便说一句,使用脚本可以导出并上传到testflight,但设备无法下载。 probably somewhere I got wrong. 可能在某个地方我错了。 if anyone knows why it is, pls let me know. 如果有人知道它为什么,请告诉我。 tks TKS
This worked for me: 这对我有用:
now you should see the right provisioning profile name. 现在您应该看到正确的配置文件名称。
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进行分发。
The answer from @MrPatol did not work for me. @MrPatol的答案对我不起作用。 My working scenario for Xcode 6.3.2 我的Xcode 6.3.2的工作场景
In Member Centre -> iOS Provisioning Profiles 在会员中心 - > iOS配置文件
In iPhone Configuration Utility -> Provisioning Profiles 在iPhone配置实用程序 - >供应配置文件中
In Xcode -> Organizer 在Xcode - > Organizer中
Here are the two key points that solved the problem for me. 以下是解决这个问题的两个关键点。
Xcode will then find the correct provisioning profile by matching up the App ID with the bundle identifier of the app. 然后,Xcode将通过将App ID与应用程序的包标识符进行匹配来找到正确的配置文件。
In fact, you need to create a new Distribution profile, specific for Ad Hoc Deployment. 实际上,您需要创建一个特定于Ad Hoc Deployment的新分发配置文件。 This can be found in the classic member center, but it is a new type of certificate. 这可以在经典会员中心找到,但它是一种新型证书。
You can then select which devices can be used to test the app as ou would do with a developer profile. 然后,您可以选择使用哪些设备来测试应用程序,就像使用开发人员配置文件一样。
And the newly created certificate will be available when you export your package from the Organizer the usual way. 当您从通常的方式从管理器导出包时,新创建的证书将可用。
Alternatively you can use the TestFlight solution provided by Apple with iOS 8 to enable your user to have access to prerelease. 或者,您可以使用Apple提供的iOS 8 TestFlight解决方案,使您的用户可以访问预发行版。
I had the same problem, finally I solved it regenerating the profile that I wanted to use in Xcode 6 including all the devices that I have registered on my iOS Dev account, doing it that way, when selecting export it shows the correct profile and I can do the Ad Hoc export with Xcode 6 without using a script. 我有同样的问题,最后我解决了它重新生成我想在Xcode 6中使用的配置文件,包括我在iOS Dev帐户上注册的所有设备,这样做,选择导出时显示正确的配置文件和我可以在不使用脚本的情况下使用Xcode 6进行Ad Hoc导出。 Hope it helps. 希望能帮助到你。
I've been stuck for a while with this ,, but using Crashlytics solved it , build distributed using the selected profile in the build settings of your Xcode project . 我已经被困了一段时间了,但是使用Crashlytics解决了它,使用Xcode项目的构建设置中的选定配置文件进行分布式构建。
hope it helps somebody . 希望它能帮到某个人。
Almost the same problem. 几乎相同的问题。 After creating an archive for distribution (Product > Archive) you export the archive (click Export...) and choose "Save for Enterprise Deployment"; 创建分发存档(产品>存档)后,导出存档(单击导出...)并选择“保存以进行企业部署”; then "Next". 然后“下一步”。 You then select the "Development Team" default (eg organisation name) and click "Choose". 然后,选择“开发团队”默认值(例如组织名称),然后单击“选择”。 Finally you will be presented with a summary view that also lists the provisioning profile that Xcode automatically has found (maybe created on-the-fly) for you. 最后,您将看到一个摘要视图,其中还列出了Xcode自动为您找到(可能是即时创建)的配置文件。 This MIGHT be the wrong provisioning profile (typically a wildcard provisioning profile, like "XC: *") and MIGHT be happening because there already is a wildcard provisioning profile on the developer portal. 这可能是错误的配置文件(通常是通配符配置文件,如“XC:*”),并且可能会发生,因为开发人员门户上已经存在通配符配置文件。 The wildcard provisioning profile MIGHT be used by other older project and maybe it is not wise to just remove the wildcard provisioning profile from the developer portal. 通配符配置文件可能被其他较旧的项目使用,也许从开发人员门户中删除通配符配置文件是不明智的。
I used a support ticket for this and only got this link back https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/ConfiguringPushNotifications/ConfiguringPushNotifications.html#//apple_ref/doc/uid/TP40012582-CH32-SW1 . 我使用了支持票,只返回此链接https://developer.apple.com/library/ios/documentation/IDEs/Conceptual/AppDistributionGuide/ConfiguringPushNotifications/ConfiguringPushNotifications.html#//apple_ref/doc/uid/TP40012582 -CH32-SW1 。 Not really a big help. 没有太大的帮助。
I have found that MrPatol 's solution also works for Enterprise Deployment as well and solves the problem for us. 我发现MrPatol的解决方案也适用于企业部署 ,并为我们解决了问题。 I first logged into the developer portal and manually create a provisioning profile that suited my app. 我首先登录开发人员门户并手动创建适合我的应用程序的配置文件。 Then downloaded and installed the new manually created provisioning profile. 然后下载并安装新手动创建的配置文件。
In xcode 7, I couldn't be able to pick adhoc provisioning via 在xcode 7中,我无法选择adhoc配置
Organizer -> Upload to App Store & Organizer -> Validate 管理器 - >上传到App Store&Organizer - >验证
But I could choose via Organizer -> Export 但我可以通过管理器选择- >导出
Edited: 编辑:
Uploading the app after exporting for adhoc to app store for testFlight caused another issue discussed here . 将adhoc导出到appFlight的应用商店后上传应用程序会导致此处讨论的另一个问题。 So, solution to both these problem is one. 因此,解决这两个问题就是一个问题。 Create AppStore provisioning to be able to pick it via organizer and utilize testFlight by uploading to appstore. 创建AppStore配置,以便能够通过组织者选择并通过上传到appstore来利用testFlight。
xcodebuild -exportArchive -archivePath $Archive_Path -exportPath $LOCAL_PACKAGE_DIR -exportOptionsPlist $Export_Plist_Path xcodebuild -exportArchive -archivePath $ Archive_Path -exportPath $ LOCAL_PACKAGE_DIR -exportOptionsPlist $ Export_Plist_Path
optionPlist file is like this, optionPlist文件是这样的,
<dict>
<key>teamID</key>
<string>MYTEAMID123</string>
<key> teamID </key>
<string>app-store</string>
<key>uploadSymbols</key>
<true/>
</dict>
<plist>
app-store, enterprise, ad-hoc, development are alternative 应用商店,企业,ad-hoc,开发是另类
Error Domain=IDEDistributionErrorDomain Code=14 "No applicable devices found." 错误域= IDEDistributionErrorDomain代码= 14“找不到适用的设备。” UserInfo={NSLocalizedDescription=No applicable devices found.} UserInfo = {NSLocalizedDescription =找不到适用的设备。}
It's a ruby problem. 这是一个红宝石问题。 Try this shell script, xcbuild-safe.sh
试试这个shell脚本, xcbuild-safe.sh
xcbuild-safe.sh xxxxNormalOptionsInXcodebuild bla...
xcbuild-safe.sh: line 62: shell_session_update: command not found xcbuild-safe.sh:第62行:shell_session_update:找不到命令
What's the hell shell_session_update
? 什么是shell_session_update
? Let us work around it. 让我们来解决它。 Just define a function before the real xcodebuild cmd, namely at the line 60 or 61. 只需在真正的xcodebuild cmd之前定义一个函数,即在第60或61行。
function shell_session_update() { :; }
In answer to your specific question, no there is no way to select the provisioning profile to be used. 在回答您的具体问题时,没有办法选择要使用的配置文件。 What are you attempting to do? 你想做什么? (ie what does the profile that you want to select allow that the automatically generated one doesn't?) (即您想要选择的配置文件允许自动生成的配置文件不是什么?)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.