Xcode 10命令行构建:存档失败,并显示Fabric Info.plist错误 [英] Xcode 10 command-line building: Archive failed with Fabric Info.plist Error

查看:349
本文介绍了Xcode 10命令行构建:存档失败,并显示Fabric Info.plist错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有用于自动构建具有两个目标的iOS项目的Jenkins服务器. 使用命令行实用程序xcodebuild构建项目.

I have Jenkins server for autobuilding iOS project that has two targets. Project builds with command-line utility xcodebuild.

完整命令是


/usr/bin/xcodebuild -workspace "Our project.xcworkspace"
    -scheme "First target"
    -configuration Release
    archive
    DEVELOPMENT_TEAM=TEAMCODE
    -allowProvisioningUpdates


/usr/bin/xcodebuild -workspace "Our project.xcworkspace"
    -scheme "Second target"
    -configuration Release
    archive
    DEVELOPMENT_TEAM=TEAMCODE
    -allowProvisioningUpdates

在我将Xcode更新到版本10之前,它可以正常工作.但是每次更新后,我都会看到错误

Before I did update Xcode to version 10 it works perfectly. But after updating each time I see error

错误:结构:Info.plist错误

error: Fabric: Info.plist Error

无法处理路径/Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/Our_project-xxxx/Build/Intermediates.noindex/ArchiveIntermediates/我们的项目/BuildProductsPath/Release-iphoneos/First应用程序中的Info.plist. app/Info.plist 这可能是一个计时问题,请确保Fabric运行脚本构建阶段是最后一个构建阶段,并且没有其他脚本从Xcode生成它的位置移动了我们的application.app.您还可以在Fabric运行脚本构建阶段将"$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)"添加为输入文件"依赖项.

Unable to process Info.plist at path /Users/Shared/Jenkins/Library/Developer/Xcode/DerivedData/Our_project-xxxx/Build/Intermediates.noindex/ArchiveIntermediates/Our project/BuildProductsPath/Release-iphoneos/First application.app/Info.plist This could be a timing issue, make sure the Fabric run script build phase is the last build phase and no other scripts have moved Our application.app from the location Xcode generated it. You can also add '$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)' as an "Input Files" dependency for your Fabric run script build phase.

**归档失败**

在谷歌搜索并阅读错误描述后,我确实在Xcode中打开了Build phases选项卡并进行了设置(将Run script项移至底部,选中Run script only when installing并将$(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)添加到输入文件中,还删除了空的Run script项目).

After googling and reading error description I did open Build phases tab in Xcode and set up it (move Run script item to bottom, check Run script only when installing and add $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH) to Input files and also remove empty Run script item).

现在可以从命令行手动构建-似乎问题已解决.甚至詹金斯也确实建立了第一个目标!但是,目标对象并没有出现相同的错误.

Manual building from command line now works - it seems like problem solved. Even Jenkins did build first target! But secong target did not with same error.

我确实打开了项目,查看构建阶段"选项卡,并看到Run script项移至上方,并且出现了新的空白Run script. 之后,我进行了实验:设置Build阶段,在Xcode GUI中重建项目,然后看到这些阶段再次重新排序.因此,它发生在构建期间或构建之后.

I did open project, look Build phases tab and saw that Run script item moved above and new empty Run script appeared. After that I did experiment: set up Build phases, rebuild project in Xcode GUI and saw that phases reordered again. So, it occurs during or after building.

如何解决此错误?

可以,我可以从命令行手动订购构建阶段吗?如果是的话,我只需在詹金斯步骤中添加一行即可.

Say, can I order build phases manually from command line? If yes, I just append row in Jenkins step.

此外:此错误仅在命令行构建中出现.当我从Xcode GUI构建项目时,它总是成功.

In addition: this error appears only in command-line building. When I build project from Xcode GUI it always succeeds.

推荐答案

好的,我得到了Fabrics的解决方案. 对于Xcode 10,将此路径添加到XCode的Build阶段的Input Files中. $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)

Okay, I got the solution form Fabrics. For Xcode 10, add this path to the Input Files in Build phase in XCode $(BUILT_PRODUCTS_DIR)/$(INFOPLIST_PATH)

这篇关于Xcode 10命令行构建:存档失败,并显示Fabric Info.plist错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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