首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >-allowProvisioningUpdates不起作用

-allowProvisioningUpdates不起作用
EN

Stack Overflow用户
提问于 2017-09-19 08:14:45
回答 8查看 26K关注 0票数 23

我们使用Jenkins进行连续集成。为了编译我们的应用程序,我们需要做的所有事情都是通过命令行(bash脚本)完成的,因为我们有几台机器,在这些机器上,构建是不需要人工访问设备的。

正如您可以想象的那样,我非常高兴地看到了XCode9中的新xcodebuild特性标志XCode9。

我理解,我需要将我们的Apple的凭证添加到XCode设置中。

凭据是首选项中的XCode帐户选项卡的附件,但是当我试图使用"xcodebuild . -allowProvisioningUpdates“编译时,会出现以下错误消息:

代码语言:javascript
运行
复制
 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

EN

回答 8

Stack Overflow用户

发布于 2017-10-27 01:10:50

我也有同样的问题。我把窃听器报告给了苹果,但没有结果。为了继续使用Xcode 9,我只为Jenkins使用了手动签名。(开发人员仍然使用自动签名。)

代码语言:javascript
运行
复制
/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*
票数 5
EN

Stack Overflow用户

发布于 2019-10-01 22:48:36

我已经修好了。问题是,我使用team_id快速通道命令指定了团队。您应该使用enable_automatic_code_signing代替。此外,未指定配置。现在我有了这个剧本:

代码语言:javascript
运行
复制
    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_idconfiguration上了。

票数 4
EN

Stack Overflow用户

发布于 2017-10-11 19:25:32

这个-allowProvisioningUpdates在Xcode 9最终版本中为我工作。

验证您可以使用Xcode IDE构建自动签名的Xcode项目。

  • 1)打开配置为自动签名的Xcode项目
    • 目标中选择目标>常规>签名
    • 自动管理签名
    • 输入团队帐户凭据。

  • 2)构建项目并验证构建成功。

关闭Xcode并使用带有-allowProvisioningUpdates选项的xcodebuild构建项目

  • 1)添加选项"xcodebuild . -allowProvisioningUpdates
  • 2)当出现提示时,"xcode希望访问密钥“ 中的"xcode apple id access”
    • 输入凭据并按下按钮始终允许

现在Jenkins命令行构建应该可以工作。

票数 3
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/46295291

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档