在我的 podfile 中,我在 podfile 中使用安装后挂钩将构建阶段脚本添加到 Pods 项目目标并构建每个目标。我遇到的问题是我正在使用
system "xcodebuild -target #{target.name} -sdk iphonesimulator"
就像我在 Pods 目录中一样,它正在构建当前的 Pods 项目。所以我需要更改到正在生成的 Pods 项目的目录(我假设它存储在一个临时目录中,然后在安装后挂钩后复制到最终的 Pods 目录)。那么有没有办法访问我在下面引用的项目目录,以便我可以在该目录中运行 xcodebuild?
post_install do | installer |
installer.project <-- need the directory of this file
end
谢谢,利亚姆。