加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

ios – Xcode 9,迦太基。 iTunes Connect错误:“无效的捆绑包

发布时间:2020-12-15 01:53:07 所属栏目:百科 来源:网络整理
导读:今天我下载了Xcode 9并对我的应用程序进行了必要的更改以进行编译。该应用程序正在本地编译和运行,没有任何问题。 使用Xcode 9我将其上传到App Store。上传成功,没有任何错误。 然后我从Apple发来以下电子邮件: Dear developer, We have discovered one o
今天我下载了Xcode 9并对我的应用程序进行了必要的更改以进行编译。该应用程序正在本地编译和运行,没有任何问题。

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

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

Dear developer,

We have discovered one or more issues with your recent delivery for
“KiteSpotter – Kitesurf wind and weather forecast”. To process your
delivery,the following issues must be corrected:

Invalid Bundle – Disallowed LLVM instrumentation. Do not submit apps
with LLVM profiling instrumentation or coverage collection enabled.
Turn off LLVM profiling or code coverage,rebuild your app and
resubmit the app.

Once these issues have been corrected,you can then redeliver the
corrected binary.

Regards,

The App Store team

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

enter image description here

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

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

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

解决方法

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

grep -lR "codeCoverageEnabled" --include *.xcscheme --null Carthage | xargs -0 sed -i '' -e 's/codeCoverageEnabled = "YES"/codeCoverageEnabled = "NO"/g'

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

使一切正常的顺序如下

>运行carthage update –platform iOS –no-use-binaries –no-build。这将更新和下载所有家属。
当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",archive. (default: bootstrap)
      platform: "iOS"  # Define which platform to build for (one of ‘all’,or comma-separated values of the formers except for ‘all’)
    )
  end

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读