xcode 什么是 *.PODSPEC 文件?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14003747/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
What is a *.PODSPEC file?
提问by Oleg Danu
I'm an iOS developer and I am really interested in all about PODSPEC file:
我是一名 iOS 开发人员,我对 PODSPEC 文件的所有内容非常感兴趣:
- What is it used for?
- Why do we need it?
- What is it helpful for?
- 它是干什么用的?
- 为什么我们需要它?
- 它有什么帮助?
Thanks a lot guys.
非常感谢各位。
Hope in this question we will collect enough info, cause I have not found a thing about it.
希望在这个问题中我们会收集到足够的信息,因为我还没有找到相关的信息。
采纳答案by Anoop Vaidya
This is the file extension for CocoaPods, which is distributed as a ruby gem. Which is available in twitter.
这是 CocoaPods 的文件扩展名,它作为 ruby gem 分发。可在twitter 上找到。
Also on github
同样在github上
EDIT:
编辑:
Cocoapods (http://cocoapods.org/) is a dependency management framework for XCode. It allows you to declaratively define project dependencies and have them included in the build of your project. It's like Apache Maven or Ruby Gems for XCode.
Cocoapods ( http://cocoapods.org/) 是 XCode 的依赖管理框架。它允许您以声明方式定义项目依赖项并将它们包含在您的项目构建中。这就像 XCode 的 Apache Maven 或 Ruby Gems。
Why you need this?
你为什么需要这个?
As an iOS developer, you certainly use a lot of code made by others, in the shape of libraries. You may not remember, but how complicated would your life be if you had to implement everything from scratch? Usually (since building static libraries manually is sooooo boring), you just add the library code into your project. But that has some disadvantages: Code that could be somewhere else is stored in your repository, wasting space. Sometimes, it's hard to get a specific version of a library. There's no central place where you can see which libraries are available. Finding a new version of a library and updating your project with it is boring and sometimes, painful. Downloading libraries manually creates a tendency to perhaps make some changes to the downloaded code and just leaving it there (making updating harder, as you'll need to merge the changes you made with the code you download for the next version).
作为 iOS 开发人员,您肯定会使用很多其他人编写的代码,以库的形式出现。您可能不记得了,但是如果您必须从头开始实施所有内容,您的生活会有多复杂?通常(因为手动构建静态库太无聊了),您只需将库代码添加到您的项目中。但这有一些缺点:可能在其他地方的代码存储在您的存储库中,浪费空间。有时,很难获得特定版本的库。没有可以查看哪些库可用的中心位置。寻找一个新版本的库并用它更新你的项目很无聊,有时也很痛苦。手动下载库可能会导致对下载的代码进行一些更改并将其留在那里(使更新变得更加困难,因为您
Copied from : http://www.raywenderlich.com/12139/introduction-to-cocoapods
复制自:http: //www.raywenderlich.com/12139/introduction-to-cocoapods