xcodebuild 归档所有目标而不是一个 [英] xcodebuild archives all targets instead of one

查看:25
本文介绍了xcodebuild 归档所有目标而不是一个的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要从我的 xcodeproj 归档一个特定的方案.为此,我运行

I need to archive a specific scheme from my xcodeproj. To do this I run

xcodebuild archive \
    -scheme $SCHEME \
    -target $TARGET \
    -archivePath $ARCHIVE_PATH

尽管我明确定义了方案和目标,但结果xcarchive包含两个目标,后续的 IPA 导出调用抱怨

Although I explicitly define a scheme and target, the resulting xcarchive contains both targets and the follow-up IPA export call complains with

error: the archive at path '<path>.xcarchive' is not a single-bundle archive
** EXPORT FAILED **

为什么 xcodebuild 会生成一个包含多个包的存档?

Why does xcodebuild produce an archive with multiple bundles?

推荐答案

这是项目方案的问题.我通过复制原始方案而不是添加新方案来创建新方案.生成的方案然后在构建部分列出了 2 个目标而不是一个(只有上帝知道为什么)并且 Xcode 不会让我删除另一个目标.

It was a problem with the project's schemes. I created new Schemes by duplicating the original one instead of adding a new one. The resulting scheme then listed 2 targets in the build section instead of one (only god knows why) and Xcode would not let me remove the other target.

一旦我删除了所有方案并从头开始创建它们,一切都运行良好.

Once I removed all schemes and created them from scratch everything worked just fine.

这篇关于xcodebuild 归档所有目标而不是一个的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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