Xcode 9,迦太基。 iTunes Connect错误:“无效的软件包 – 不允许的LLVM仪器”
今天,我下载了Xcode 9,并对我的应用程序进行了必要的更改编译。 该应用程序在本地编译和运行,没有任何问题。
使用Xcode 9我把它上传到App Store。 上传成功,没有任何错误。
然后,我从苹果公司收到以下电子邮件:
亲爱的开发者
我们发现一个或多个与您最近交付“KiteSpotter – 风筝冲浪风和天气预报”的问题。 要处理您的交付,必须纠正以下问题:
无效的捆绑 – 不允许的LLVM检测。 不要使用LLVM分析工具或范围集合来提交应用程序。 closuresLLVM分析或代码覆盖率,重build您的应用程序并重新提交应用程序。
一旦这些问题得到纠正,您可以重新发送更正的二进制文件。
问候,
App Store团队
我去了,closures了我的目标和cocoa豆荚目标的代码覆盖率,这是我能find的唯一的相关设置:
重新提交应用程序,我得到相同的错误。
在我的项目中,我使用了迦太基,它有15个以上的依赖关系。 search解决scheme我发现所有项目都需要使用上述设置进行更新。
- 是否有任何解决scheme自动化所有框架的设置,如果这是导致问题。
- 有没有其他人面临这个问题,并整理出来。 迦太基框架是创造这个问题还是别的什么?
将所有依赖项的代码覆盖率自动设置为false的解决scheme是在terminal上运行以下命令(请转到您的项目目录):
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
。 这将更新和下载所有依赖项。 当迦太基开始编译时,可以按ctrl + c取消。 - 运行上面的命令将代码覆盖率设置为NO
- 现在,一切都到位运行
carthage build --platform iOS
。 这将构build一切代码覆盖率为NO
您现在可以存档并上传到iTC。
这个命令是由https://github.com/gunterhager提供的 ,所以信用卡给他
作为fastlane用户的替代scheme,将下列内容添加到您的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
作为快速修复,在terminal中运行这些命令(一定要去你的项目的根文件夹):
-
carthage update --platform iOS --no-use-binaries --no-build
这将更新您的依赖关系,但不会build立任何东西。 -
grep -lR "codeCoverageEnabled" --include *.xcscheme --null Carthage | xargs -0 sed -i '' -e 's/codeCoverageEnabled = "YES"/codeCoverageEnabled = "NO"/g'
grep -lR "codeCoverageEnabled" --include *.xcscheme --null Carthage | xargs -0 sed -i '' -e 's/codeCoverageEnabled = "YES"/codeCoverageEnabled = "NO"/g'
这将设置代码覆盖率为NO
。 -
carthage build --platform iOS
这将最终build立所有框架没有代码覆盖。
现在您可以将您的项目归档并上传到iTunes Connect。
在Carthage
项目的好人已经在一个更友好的修复工作,所以一定要检查发布那里。
只需将Carthage
更新到0.26.0
或更高版本,然后再次运行carthage update
命令。
我也得到了同样的错误从Xcode 9.1,即使我已经更新迦太基到最新版本https://github.com/Carthage/Carthage/releases我没有上传build立到iTunes
这样为我工作: –
如果你已经更新你的Xcode到9.1那么
从https://github.com/Carthage/Carthage/releases更新您的carthage.pkg
下载
安装.pkg
和
通过参考您的项目在Terminal
给carthage update
命令
和
然后转到项目“ Build Settings
查找“ Enable Code Coverage Support
将该设置从“ Yes
更改为“ No
然后存档并上传到AppStore
。 你build立会ready
。 Happy
!
- 我怎样才能为多个属性创build一个CABasicAnimation?
- 如何获得iOS 8的UICollectionViewCells的自动布局大小? (在iOS 8中,systemLayoutSizeFittingSize返回高度为零的大小)