什么是 CocoaPods“(未使用)”
What is CocoaPods "(unused)"
在运行pod outdated
之后,我得到以下输出
Updating spec repo `master`
Analyzing dependencies
The following pod updates are available:
- AFNetworking 2.4.4 -> 2.5.4 (latest version 3.0.0-beta.2)
- HexColors 2.2.1 -> 2.2.1 (latest version 3.0.0)
- Overcoat 3.0.0 -> (unused) (latest version 3.2.1)
- ReactiveCocoa 2.5 -> 2.5 (latest version 4.0.4-alpha-4)
我在
之前没见过这个 "unused" 术语
即
Overcoat 3.0.0 ->
(未使用) (latest version 3.2.1)
这是什么?这是什么意思?
分析源码后,我认为(unused)
意味着Pod不在你的Podfile中(可能是你删除了它并没有重新安装)
AFNetworking 2.4.4 -> 2.5.4 (latest version 3.0.0-beta.2)
^ ^ ^ ^
Pod name Installed version Podfile version Latest
基于插入这个标签的source code,看起来像这样:
if source_version > lockfile_version
matching_spec = unlocked_pods.find { |s| s.name == pod_name }
matching_version =
matching_spec ? matching_spec.version : '(unused)'
[pod_name, lockfile_version, matching_version, source_version]
end
这似乎只是意味着 CocoaPods 无法在您的 'unlocked pods' 中找到该 Pod。
我的 Ruby 说得不够好,无法准确地确定 "unlocked" pod 是什么(我对 CocoaPods 的熟悉程度也不足以听过这个词......但我知道的 'lockfile',也许这是相关的),但是 here is the source code for determining that:
def unlocked_pods
@unlocked_pods ||= begin
pods = []
UI.titled_section('Analyzing dependencies') do
pods = Installer::Analyzer.new(config.sandbox, config.podfile).
analyze(false).
specs_by_target.values.flatten.uniq
end
pods
end
end
在运行pod outdated
之后,我得到以下输出
Updating spec repo `master`
Analyzing dependencies
The following pod updates are available:
- AFNetworking 2.4.4 -> 2.5.4 (latest version 3.0.0-beta.2)
- HexColors 2.2.1 -> 2.2.1 (latest version 3.0.0)
- Overcoat 3.0.0 -> (unused) (latest version 3.2.1)
- ReactiveCocoa 2.5 -> 2.5 (latest version 4.0.4-alpha-4)
我在
之前没见过这个 "unused" 术语即
Overcoat 3.0.0 ->
(未使用) (latest version 3.2.1)
这是什么?这是什么意思?
分析源码后,我认为(unused)
意味着Pod不在你的Podfile中(可能是你删除了它并没有重新安装)
AFNetworking 2.4.4 -> 2.5.4 (latest version 3.0.0-beta.2)
^ ^ ^ ^
Pod name Installed version Podfile version Latest
基于插入这个标签的source code,看起来像这样:
if source_version > lockfile_version
matching_spec = unlocked_pods.find { |s| s.name == pod_name }
matching_version =
matching_spec ? matching_spec.version : '(unused)'
[pod_name, lockfile_version, matching_version, source_version]
end
这似乎只是意味着 CocoaPods 无法在您的 'unlocked pods' 中找到该 Pod。
我的 Ruby 说得不够好,无法准确地确定 "unlocked" pod 是什么(我对 CocoaPods 的熟悉程度也不足以听过这个词......但我知道的 'lockfile',也许这是相关的),但是 here is the source code for determining that:
def unlocked_pods
@unlocked_pods ||= begin
pods = []
UI.titled_section('Analyzing dependencies') do
pods = Installer::Analyzer.new(config.sandbox, config.podfile).
analyze(false).
specs_by_target.values.flatten.uniq
end
pods
end
end