cocoapods pods项目构建设置 [英] cocoapods pods project build settings

查看:105
本文介绍了cocoapods pods项目构建设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,每次我们运行Pod更新时,pod项目都会重新生成。无论我们在pods项目中手动设置的任何构建设置都将重置。

So everytime we run a pod update, the pods project gets regenerated. Whatever build settings we manually set in the pods project is reset.

我想知道是否在Pod之后是否有必要为pods项目中的目标设置一些构建设置项目是由pod更新生成的?

I'm wondering if theres anyway to set some build settings of the targets in the pods project after the pod project is generated by a pod update?

任何帮助都值得赞赏。

推荐答案

经过数小时的可可脚怪和阅读文档之后,我想出了以下解决方案:

After a few hours of twiddling with cocoapods and reading documentation, I have come up with the following solution:

在您的podspec文件中,有一个选项可以指定要生成的xcconfig,请设置以下内容:

In your podspec file, there is an option to specify the xcconfig to be generated, set the following:

s.xcconfig = {'TEST_AFTER_BUILD' => 'YES', 'GCC_GENERATE_TEST_COVERAGE_FILES' => 'YES'}

在我的情况下,我需要从pods项目中生成coverage文件。

In my case i needed to generate coverage files from the pods project.

这将在pod更新后在xcconfig文件中生成,并因此包含在pods项目中。

This will in turn be generated in the xcconfig file after the pod update and hence be included in the pods project.

这篇关于cocoapods pods项目构建设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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