编辑 Xcode xcconfig 文件和 Cocoapods [英] Edit Xcode xcconfig file and Cocoapods

查看:64
本文介绍了编辑 Xcode xcconfig 文件和 Cocoapods的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想编辑 xcconfig 文件,但不幸的是 Xcode 每个配置只允许 1 个 xcconfig 文件,那就是 Pods.xcconfig 因为我正在使用 Cocoapods

那么我怎样才能在不伤害 Cocoapods 的情况下编辑 xcconfig

我能想到几种方法

  1. 让 Xcode 使用多个 xcconfig 文件
  2. 使用我自己的包含 Pods.xcconfig 文件的 xcconfig 文件

那么如何处理呢?

解决方案

这里是 CocoaPods 中的一个问题跟踪器.此处描述了一种解决方法:#1736.

正如 kylef(CocoaPods 存储库的所有者)所提到的:

<块引用>

手动解决方法:使用 pod install --no-integrate 然后从您的自定义 xcconfig 文件中添加 #include Pods/Pods-GCE.xcconfig".>

我不认为有一个明确的解决方案可以自动修复它,但如果可可豆荚检测到这一点并告诉用户可能会更好.我花了一段时间才弄清楚在我执行 pod install 并且项目 xcconfig 文件没有被包含之后发生了什么.

I want to edit the xcconfig file, but unfortunately Xcode only allows 1 xcconfig file per configuration, and that is Pods.xcconfig because I'm using Cocoapods

So how can I edit the xcconfig without hurting Cocoapods

I can think of several ways

  1. Make Xcode use multiple xcconfig files
  2. Use my own xcconfig file that includes Pods.xcconfig file

So how to deal with this ?

解决方案

Here is a issue in CocoaPods Tracker. A workaround is described here: #1736.

As kylef (owner of CocoaPods repo) mentioned:

Manual Workaround: Use pod install --no-integrate then add #include "Pods/Pods-GCE.xcconfig" from your custom xcconfig files.

I don't think there is a clear solution to automatically fix it, but maybe it would be nice if cocoa pods detected this and told the user. Took me a while to figure out what happened after I did pod install and the projects xcconfig files wasn't being included.

这篇关于编辑 Xcode xcconfig 文件和 Cocoapods的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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