简体   繁体   English

检查iOS项目是否正在使用Cocoapods

[英]Check if an iOS project is using Cocoapods

Is there a way to figure out if an iOS repository is using cocoapods or not? 有没有办法确定iOS存储库是否使用cocoapods?

At my first thought I was planning to use github api and check if the Podfile exists. 最初我打算使用github api并检查Podfile是否存在。 But there could be repositories which has podfile but are not actually using it. 但是可能存在具有podfile但实际上并未使用它的存储库。

I am working on a ruby script in which I need to figure out if the iOS repo's is using cocoapods. 我正在研究一个ruby脚本,在其中我需要弄清楚iOS repo是否正在使用cocoapods。

I'd say your best bet would be to do what you're saying and check if there is a Podfile . 我想您最好的选择就是按照您的意思说,检查是否有Podfile I think the bigger problem with this approach would be you'd have to check in nested directories too. 我认为这种方法的更大问题是您也必须签入嵌套目录。 If you wanted to make this way more complicated than it's worth you could use the xcodeproj gem and look around the project's linked files for the Pods.xcconfig . 如果您想使这种方法变得更复杂,那么可以使用xcodeproj gem并在项目的链接文件中查找Pods.xcconfig

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM