我正在使用RestKit,它使用不同的podfiles。我想知道哪个是该示例app中使用的podfile版本。还想知道如何通过终端更新podfile?
答案 0 :(得分:1)
问题1:
如果已安装pod,请转到该pod的info.plist文件,然后您可以在其中看到已安装pod的版本。
问题2: 要通过终端更新podfile,请使用
打开podfilevi podfile
点击"我"然后您可以在podfile中编辑或插入项目。要保存更改,请使用
click esc then :wq!
运行pod update
以更新更改。
答案 1 :(得分:0)
问题1
您可以在项目的podspec文件中了解这一点。对于你的情况,RestKit's podspec:
Pod::Spec.new do |s|
s.name = 'RestKit'
s.version = '0.24.1'
s.summary = 'RestKit is a framework for consuming and modeling RESTful web resources on iOS and OS X.'
s.homepage = 'https://github.com/RestKit/RestKit'
s.social_media_url = 'https://twitter.com/RestKit'
s.author = { 'Blake Watters' => 'blakewatters@gmail.com' }
s.source = { :git => 'https://github.com/RestKit/RestKit.git', :tag => "v#{s.version}" }
s.license = 'Apache License, Version 2.0'
... ... ...
在Podfile中使用时,如下所示:
pod' RestKit'
它会自动获得最新发布的版本!。对于您的情况,它是项目的podspec文件中的这一行:
s.version = '0.24.1'
但如果您想决定使用此行安装哪个版本:
pod 'RestKit', '~> 0.24.0'
问题2
您可以使用此命令更新pod:
pod update
希望现在一切都很清楚。