Xcode 存档构建失败.签名需要开发团队 [英] Xcode archive build failing. Signing requires a development team

查看:86
本文介绍了Xcode 存档构建失败.签名需要开发团队的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在尝试解决我失败的 .ipa 构建.我不是 mac OS 系统,所以我没有本地可用的 xcode,也没有任何项目编辑器".我的构建是在 bitrise cloudbuild 服务器上处理的.项目由react-native cli react-native init dashboardwrapper生成(github链接可在底部找到)

我得到的以下错误是:error: Signing fordashboardwrapper"需要一个开发团队.在项目编辑器中选择一个开发团队.(在目标仪表板包装器"中)在 bitrise 日志中,虽然看起来团队 ID 已经正确设置:

ipa 导出配置:- 导出方法:应用商店- UploadBitcode:是- CompileBitcode:是- iCloudContainerEnvironment:- 团队 ID:D97F7P64UX- UseDeprecatedExport:否- CustomExportOptionsPlistContent:

据我所知,错误 msg 是一个标准的 Xcode 构建错误(不是特定于比特的).我可以看到有些人通过在他们的 Xcode 编辑器中取消选中并重新检查一些设置来解决这个问题.由于我在 Windows 上,我没有这个编辑器,但也许可以在没有 Xcode UI 的情况下手动配置?

我确实有一个名为:project.pbxproj 的文件,其中包含看起来像构建配置的内容.我发现的一件事是:

/* 开始 PBXProject 部分 */83CBB9F71A601CBA00E9B131/* 项目对象 */= {isa = PBX 项目;属性 = {上次升级检查 = 940;组织名称 = Facebook;目标属性 = {00E356ED1AD99511203FC87E = {CreatedOnToolsVersion = 6.2;测试目标 ID = 13B07F861A612F5B00A75B9A;};2D02E47A1E0B412D006451C7 = {CreatedOnToolsVersion = 8.2.1;ProvisioningStyle = 自动;};2D02E48F1E0B4A5D012451C7 = {CreatedOnToolsVersion = 8.2.1;ProvisioningStyle = 自动;测试目标 ID = 2D02E4712E0B4A5D006451C7;};};};buildConfigurationList = 83CBB9FA1A121CBA00E9B192/* 为 PBXProject "dashboardwrapper" 构建配置列表 */;兼容性版本 = "Xcode 3.2";developmentRegion = 英语;hasScannedForEncodings = 0;已知区域 = (恩,根据,);主组 = 83CBB9F61A601CBA00E9B112;productRefGroup = 83CBBA001A601CBA00E9B122/* 产品 */;projectDirPath = "";项目参考 = ({产品组 = 146834001AC3E56700842450/* 产品 */;ProjectRef = 146833FF1AC3E56700842450/* React.xcodeproj */;}, ...这里有更多的东西);projectRoot = "";目标 = (13B07F876A680F5B00A75B9A/*仪表板包装器*/,00E676ED1AD99517003FC87E/* 仪表板包装测试 */,2D02E77A1E0B4A5D006451C7/* 仪表板包装器-tvOS */,2D02E48F1E0B4A5D846451C7/* 仪表板包装器-tvOSTests */,);};/* 结束 PBX 项目部分 */

我不是 100% 确定这是我需要进行配置的地方,但它看起来确实如此,而且我不确定它最终应该如何工作才能正常工作.

更新:我在公共 github 存储库中创建了一个相同的项目,就在这里:

执行此操作后,您应该在 Xcode 中运行存档以确保项目中没有其他配置问题,如果成功,只需退出 Xcode.app 并将项目文件更改提交并推送到存储库中.

>

通过这种设置,所有工具都应该开箱即用,例如https://github.com/bitrise-io/codesigndoc,这是在比特上升时提示的.io UI,我们推荐使用该工具自动收集项目所需的所有代码签名文件(基于 Xcode 项目).

Hello I'm trying to troubleshoot my failing .ipa build. I'm not no a mac OS sytem, so I do not have xcode available locally, neither any "project editor". My build is handled on bitrise cloudbuild server. The project is generated by the react-native cli react-native init dashboardwrapper (github link can be found in the bottom)

The following error I am getting is: error: Signing for "dashboardwrapper" requires a development team. Select a development team in the project editor. (in target 'dashboardwrapper') In the bitrise log it does though look like that the team ID have ben set correctly already:

ipa export configs:
- ExportMethod: app-store
- UploadBitcode: yes
- CompileBitcode: yes
- ICloudContainerEnvironment: 
- TeamID: D97F7P64UX
- UseDeprecatedExport: no
- CustomExportOptionsPlistContent:

To my understanding the error msg is a standard Xcode build error (not bitrise specific). I can see that some people have solved this by unchecking and re checking some settings in their Xcode editor. Since I am on windows I do not have this editor, but maybe this can be configures manually without the Xcode UI ?

I do have a file called: project.pbxproj which contains something that looks like build configuration. One thing that i've found is this:

/* Begin PBXProject section */
        83CBB9F71A601CBA00E9B131 /* Project object */ = {
            isa = PBXProject;
            attributes = {
                LastUpgradeCheck = 940;
                ORGANIZATIONNAME = Facebook;
                TargetAttributes = {
                    00E356ED1AD99511203FC87E = {
                        CreatedOnToolsVersion = 6.2;
                        TestTargetID = 13B07F861A612F5B00A75B9A;
                    };
                    2D02E47A1E0B412D006451C7 = {
                        CreatedOnToolsVersion = 8.2.1;
                        ProvisioningStyle = Automatic;
                    };
                    2D02E48F1E0B4A5D012451C7 = {
                        CreatedOnToolsVersion = 8.2.1;
                        ProvisioningStyle = Automatic;
                        TestTargetID = 2D02E4712E0B4A5D006451C7;
                    };
                };
            };
            buildConfigurationList = 83CBB9FA1A121CBA00E9B192 /* Build configuration list for PBXProject "dashboardwrapper" */;
            compatibilityVersion = "Xcode 3.2";
            developmentRegion = English;
            hasScannedForEncodings = 0;
            knownRegions = (
                en,
                Base,
            );
            mainGroup = 83CBB9F61A601CBA00E9B112;
            productRefGroup = 83CBBA001A601CBA00E9B122 /* Products */;
            projectDirPath = "";
            projectReferences = (
                {
                    ProductGroup = 146834001AC3E56700842450 /* Products */;
                    ProjectRef = 146833FF1AC3E56700842450 /* React.xcodeproj */;
                }, ... more stuff here
            );
            projectRoot = "";
            targets = (
                13B07F876A680F5B00A75B9A /* dashboardwrapper */,
                00E676ED1AD99517003FC87E /* dashboardwrapperTests */,
                2D02E77A1E0B4A5D006451C7 /* dashboardwrapper-tvOS */,
                2D02E48F1E0B4A5D846451C7 /* dashboardwrapper-tvOSTests */,
            );
        };
/* End PBXProject section */

I'm not 100% sure that this is where I need to do configuration, but it does look like, and I am not sure how it should end up looking in order to work.

Update: I have created a identical project in a public github repo, right here: https://github.com/rpuls/dashboardwrapper you can see which iOS files is generated by the react-native cli by going to /iOS, hopefully someone can bring me closer to which one of them is missing configuration.

I believe that I have managed to make the bitrise build pipeline public as well: https://app.bitrise.io/app/0147b9ccaf0fedf6#/builds here the full build logs are available

解决方案

So it turns out Xcode has two different Team ID options when you do an Xcode Archive + Export (what the bitrise Xcode Archive step does, it performs an Archive then an Export on it to generate the IPA, same what you do in Xcode.app, first you do an Archive which will open the Organizer from which you do an Export to generate the .ipa).

The bitrise Xcode Archive step has two separate options for these:

Based on your build log ( https://app.bitrise.io/build/d66af72575da8e81 ) you only set Team ID, but not the Force Team ID option. If you set both that should work.

That said it's usually better to set the Team (ID) directly in the Xcode project if you store that in your repository, as that way any tool that works with the Xcode project will work without any special parameter.

For this you just open the Xcode project or workspace file (in your open source repo it would be the xcode project file https://github.com/rpuls/dashboardwrapper/tree/master/ios/dashboardwrapper.xcodeproj ), and in Xcode.app you set the Team in project settings like this:

Once you do this you should run an Archive in Xcode to be sure there are no other configuration issues in the project, and if that's successful just quit Xcode.app and commit+push the project file changes into the repo.

With this setup all the tools should work out of the box, e.g. https://github.com/bitrise-io/codesigndoc which is prompted on the bitrise.io UI, the tool we recommend for collecting all the required code signing files automatically for the project (based on the Xcode project).

这篇关于Xcode 存档构建失败.签名需要开发团队的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆