在安装后挂钩中访问Pods项目目录

时间:2015-07-19 21:08:11

标签: cocoapods post-install

在我的podfile中,我在podfile中使用了一个安装后挂钩,将构建阶段脚本添加到Pods项目目标并构建每个目标。我遇到的问题是我正在使用

post_install do | installer | installer.project <-- need the directory of this file end

正在构建当前的Pods项目,因为我在Pods目录中。所以我需要的是更改到正在生成的Pods项目的目录(我假设它存储在临时目录中,然后在安装后挂钩后复制到最终的Pods目录)。那么有没有办法访问我在下面引用的项目目录,以便我可以在该目录中运行xcodebuild?

{{1}}

谢谢, 小连

1 个答案:

答案 0 :(得分:0)

您可能正在尝试复制此插件:cocoapods-native-integration。但是,否则,您能够通过target.user_project_path here

访问xcodeproj路径