jenkins 包含应用程序剪辑的Xcode项目的导出存档错误

fcwjkofz  于 2023-05-16  发布在  Jenkins
关注(0)|答案(1)|浏览(194)

我们正在使用Jenkins来自动构建我们的iOS项目。在我们将App Clip集成到Xcode项目之前,一切都很好。错误说(我改变真实的包ID):

error: exportArchive: Provide a bundle identifier to select from
available reformatters: com.example.myapp and com.example.myapp.Clip

Error Domain=IDEDistributionReformatterSelectionStepErrorDomain
Code=0 "Provide a bundle identifier to select from available reformatters:
com.example.myapp and com.example.myapp.Clip"

我创建了ExportOptions.plist,并在其中设置distributionBundleIdentifier等于com.example.myapp。然后在Jenkins中添加了Advanced Xcode build options -> Custom xcodebuild arguments
Jenkins要求我提供-exportArchive附加密钥。在我这样做之后,Jenkins告诉我在命令行中同时使用schemeexportArchive是非法的。
有人知道怎么修吗?谢谢

ux6nzvsh

ux6nzvsh1#

我遇到了与App Clip完全相同的问题,同时试图使用Fastlane构建和上传我的项目到Firebase与ad-hoc导出方法。
如果你使用xcodebuild -help命令,你会发现这样一个选项:
distributionBundleIdentifier:弦
重新格式化存档,以关注符合条件的目标捆绑包标识符。
要解决这个问题,可以将distributionBundleIdentifier添加到-exportOptionsPlist,如下所示:

<key>distributionBundleIdentifier</key>
<string>com.example.project</string>

对于那些正在寻找Fastlane解决方案的人,您可以将相同的密钥添加到导出选项中,如下所示:

gym(
  export_method: "ad-hoc",
  export_options: {
    distributionBundleIdentifier: 'com.example.project'
  }
)

希望这对某人有帮助。

相关问题