Cocoapods pod安装为目标依赖项 [英] Cocoapods pod install as a target dependency

查看:68
本文介绍了Cocoapods pod安装为目标依赖项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在我的Xcode项目中创建了一个外部构建系统目标,并将其作为主要目标的依赖项,因此我希望在主要目标开始构建之前运行该目标。在这个外部构建系统目标中,我只是引用一个bash脚本从SRCROOT目录运行 pod install

I've created an external build system target in my Xcode project and made it a dependency of the main target, so I want this target run before the main target starts building. In this external build system target I simply reference a bash script to run pod install from the SRCROOT dir.

可以预期,我的新目标将首先运行,并且 Pod安装运行良好,但随后构建将停止。它并没有失败,它只是报告构建没有问题而已停止。 pod安装的退出代码为0,因此脚本应返回成功但构建停止。

As expected, my new target runs first and Pod install runs fine but then the build stops. It does not fail however, it just reports the Build stopped with no issues. The exit code from pod install is 0 so the script should return as successful yet the build stops.

有人知道为什么会发生这种情况吗?

Does anyone know why this may be happening?

推荐答案

我尝试直接在CocoaPods中实现相同的功能,并且遇到了相同的行为。我认为Xcode会中止构建过程,因为CocoaPods在Pods项目中执行更改,此更改是从头开始重新创建的。

I tried to implement the same functionality directly in CocoaPods and experienced the same behavior. I think that Xcode aborts the build as CocoaPods performs changes in the Pods project, which is recreated from scratch at the moment.

一旦我们开始进行编辑,这种方法可能是可行的在CocoaPods中完成了Pods项目。

This approach might be viable once we start to edit in place the Pods project in CocoaPods.

这篇关于Cocoapods pod安装为目标依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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