Xcode 9,迦太基.iTunes Connect错误:"无效的捆绑包 - 不允许的LLVM工具"

zir*_*isp 28 xcode itunesconnect ios carthage xcode9

今天我下载了Xcode 9并对我的应用程序进行了必要的更改以进行编译.该应用程序正在本地编译和运行,没有任何问题.

使用Xcode 9我将其上传到App Store.上传成功,没有任何错误.

然后我从Apple发来以下电子邮件:

亲爱的开发者,

我们发现了您最近交付的"KiteSpotter - Kitesurf风和天气预报"中的一个或多个问题.要处理您的交付,必须纠正以下问题:

无效的捆绑包 - 不允许的LLVM工具.不要提交启用了LLVM配置文件检测或coverage集合的应用程序.关闭LLVM配置文件或代码覆盖率,重建您的应用程序并重新提交应用程序.

一旦纠正了这些问题,您就可以重新更新已更正的二进制文件.

问候,

App Store团队

我去了我的目标和可可豆荚目标的代码覆盖率,这是我能找到的唯一相关设置:

在此输入图像描述

重新提交应用程序,我收到同样的错误.

在我的项目中,我使用的是Carthage,它有超过15个依赖项.在寻找解决方案时,我发现所有项目都需要使用上述设置进行更新.

  • 是否有任何解决方案可以自动为所有框架设置此设置,如果这导致问题.
  • 有没有其他人遇到过这个问题并将其整理出来.迦太基框架是否会产生问题或其他问题?

zir*_*isp 34

为所有依赖项自动设置代码覆盖率为false的解决方案是在终端上运行以下命令(请转到项目目录):

grep -lR "codeCoverageEnabled" --include *.xcscheme --null Carthage | xargs -0 sed -i '' -e 's/codeCoverageEnabled = "YES"/codeCoverageEnabled = "NO"/g'
Run Code Online (Sandbox Code Playgroud)

这会将代码覆盖率设置为NO,iTunes连接不会抱怨.

使一切正常的顺序如下

  • carthage update --platform iOS --no-use-binaries --no-build.这将更新和下载所有dependecies.当Carthage开始编译时,你可以按ctrl + c取消.
  • 运行以上命令将代码覆盖率设置为NO
  • 现在一切都到位了carthage build --platform iOS.这将构建代码覆盖率为NO的所有内容

您现在可以存档并上传到iTC.

该命令由https://github.com/gunterhager提供,所以归功于他


作为fastlane用户的替代方案,请将以下内容添加到fastlane文件中,该文件将自动执行所有操作:

  desc "Update Carthage"
  lane :update_carthage do
    carthage(
      command: "update",       # One of: build, bootstrap, update, archive. (default: bootstrap)
      use_binaries: false,         # Check out dependency repositories even when prebuilt frameworks exist
      no_build: true,  # When bootstrapping Carthage do not build
      platform: "iOS"  # Define which platform to build for (one of ‘all’, ‘Mac’, ‘iOS’, ‘watchOS’, ‘tvOS‘, or comma-separated values of the formers except for ‘all’)
    )
    sh("grep -lR 'codeCoverageEnabled' --include *.xcscheme --null Carthage | xargs -0 sed -i '' -e 's/codeCoverageEnabled = 'YES'/codeCoverageEnabled = 'NO'/g'")
    carthage(
      command: "build",       # One of: build, bootstrap, update, archive. (default: bootstrap)
      platform: "iOS"  # Define which platform to build for (one of ‘all’, ‘Mac’, ‘iOS’, ‘watchOS’, ‘tvOS‘, or comma-separated values of the formers except for ‘all’)
    )
  end
Run Code Online (Sandbox Code Playgroud)

  • 如果你没有像我这样安装GNU命令行,你可以使用它:find Carthage -type f -name"*.xcscheme"-print0 | xargs -0 perl -pi -e's/codeCoverageEnabled ="YES"/ codeCoverageEnabled ="NO"/ g' (7认同)

Gun*_*ger 13

快速修复,在终端中运行这些命令(确保转到项目的根文件夹):

  • carthage update --platform iOS --no-use-binaries --no-build 这将更新您的依赖项,但不会构建任何内容.

  • grep -lR "codeCoverageEnabled" --include *.xcscheme --null Carthage | xargs -0 sed -i '' -e 's/codeCoverageEnabled = "YES"/codeCoverageEnabled = "NO"/g'这将设置代码覆盖率NO.

  • carthage build --platform iOS 这将最终构建所有框架而无需代码覆盖.

现在,您可以存档项目并将其上传到iTunes Connect.

Carthage项目的优秀人员已经在进行更加用户友好的修复,所以一定要检查那里的版本.