我们使用Jenkins进行连续集成。为了编译我们的应用程序,我们需要做的所有事情都是通过命令行(bash脚本)完成的,因为我们有几台机器,在这些机器上,构建是不需要人工访问设备的。
正如您可以想象的那样,我非常高兴地看到了XCode9中的新xcodebuild特性标志XCode9。
我理解,我需要将我们的Apple的凭证添加到XCode设置中。
凭据是首选项中的XCode帐户选项卡的附件,但是当我试图使用"xcodebuild . -allowProvisioningUpdates“编译时,会出现以下错误消息:
2017-09-19 09:47:59.692 xcodebuild[74979:3824315] DVTAssertions: Warning in /Library/Caches/com.apple.xbs/Sources/DVTFrameworks/DVTFrameworks-13231/DVTFoundation/Portal/DVTDeveloperAccountCredentialsManager.m:38
Details: Unable to find default keychain.
Object: <DVTDeveloperAccountCredentialsManager>
Method: +defaultAccountCredentialsManager
Thread: <NSThread: 0x7fe17860aa40>{number = 4, name = (null)}
Please file a bug at http:/
2017-09-19 09:47:59.792 xcodebuild[74979:3824308] [MT] IDEDistribution: Step failed: <IDEDistributionSigningAssetsStep: 0x7fe17d45cf20>: Error Domain=IDEDistributionSigningAssetStepErrorDomain Code=0 "Locating signing assets failed." UserInfo={NSLocalizedDescription=Locating signing assets failed., IDEDistributionSigningAssetStepUnderlyingErrors=(
"Error Domain=DVTServicesSessionErrorDomain Code=0 \"Unable to log in with account 'xxx@yyy.com'.\" UserInfo={NSLocalizedFailureReason=Unable to log in with account 'xxx@yyy.com'., NSLocalizedRecoverySuggestion=The login details for account 'xxx@yyy.com' were rejected., DVTDeveloperAccountErrorAccount=<DVTAppleIDBasedDeveloperAccount 0x7fe179b016c0: username: xxx@yyy.com>, NSUnderlyingError=0x7fe179e8ee60 {Error Domain=DVTDeveloperAccountErrorDomain Code=4 \"xxx@yyy.com could not sign in.\" UserInfo={NSLocalizedRecoverySuggestion=Cannot sign in to this account. Try signing into it again in the Accounts preference pane., NSLocalizedDescription=xxx@yyy.com could not sign in., DVTDeveloperAccountErrorAccount=<DVTAppleIDBasedDeveloperAccount 0x7fe179b016c0: username: xxx@yyy.com>}}}",
"Error Domain=IDEProfileLocatorErrorDomain Code=1 \"No profiles for 'com.yyy.CITestProject' were found\" UserInfo={NSLocalizedDescription=No profiles for 'com.yyy.CITestProject' were found, NSLocalizedRecoverySuggestion=Xcode couldn't find any iOS App Store provisioning profiles matching 'com.yyy.CITestProject'.}"
)}
error: exportArchive: The operation couldn’t be completed. Unable to log in with account 'xxx@yyy.com'.
有人知道怎么解决这个问题吗?
更新:我们使用这个插件为我们的Jenkins奴隶启动ssh会话,以便完成构建工作:https://wiki.jenkins.io/display/JENKINS/SSH+Slaves+plugin
发布于 2017-10-27 01:10:50
我也有同样的问题。我把窃听器报告给了苹果,但没有结果。为了继续使用Xcode 9,我只为Jenkins使用了手动签名。(开发人员仍然使用自动签名。)
/usr/bin/xcodebuild -exportArchive \
DEVELOPMENT_TEAM=*your-dev-team-id* \
CODE_SIGN_STYLE=Manual \
CODE_SIGN_IDENTITY="iPhone Distribution: *your cert*" \
PROVISION_PROFILE="*your*.mobileprovision" \
*rest of your parameters*
发布于 2019-10-01 22:48:36
我已经修好了。问题是,我使用team_id
快速通道命令指定了团队。您应该使用enable_automatic_code_signing
代替。此外,未指定配置。现在我有了这个剧本:
enable_automatic_code_signing(
team_id: <YOUR_TEAM_ID_REQUIRED_HERE>,
)
gym(
scheme: <YOUR_SCHEME_REQUIRED HERE>,
configuration: <YOUR_CONFIGURATION_REQUIRED HERE>,
export_method: "development",
xcargs: "-allowProvisioningUpdates",
)
另外,我找到了这页面。我同时尝试了上面的变化,所以我不知道是什么帮助了我。但是我已经从页面中恢复了变化,它仍然有效。所以我想问题就出在team_id
和configuration
上了。
发布于 2017-10-11 19:25:32
这个-allowProvisioningUpdates在Xcode 9最终版本中为我工作。
验证您可以使用Xcode IDE构建自动签名的Xcode项目。
关闭Xcode并使用带有-allowProvisioningUpdates选项的xcodebuild构建项目
现在Jenkins命令行构建应该可以工作。
https://stackoverflow.com/questions/46295291
复制相似问题