Commit bc0606e9 authored by Marius Rackwitz's avatar Marius Rackwitz

Fix crash in Analyzer#compute_user_project_targets_require_framework

If there are localized resources in a user target, which are referenced in a source build phase, then this caused a crash, because not all valid destination types of the relation PBXBuildFile#file_ref were handled.
parent 1f6f3878
...@@ -578,8 +578,20 @@ module Pod ...@@ -578,8 +578,20 @@ module Pod
# uses Swift # uses Swift
# #
def compute_user_project_targets_require_framework(target_definition, native_targets) def compute_user_project_targets_require_framework(target_definition, native_targets)
file_predicate = nil
file_predicate = proc do |file_ref|
if file_ref.respond_to?(:last_known_file_type)
file_ref.last_known_file_type == 'sourcecode.swift'
elsif file_ref.respond_to?(:files)
file_ref.files.any?(file_predicate)
else
false
end
end
target_definition.platform.supports_dynamic_frameworks? || native_targets.any? do |target| target_definition.platform.supports_dynamic_frameworks? || native_targets.any? do |target|
target.source_build_phase.files.any? { |f| f.file_ref.last_known_file_type == 'sourcecode.swift' } target.source_build_phase.files.any? do |build_file|
file_predicate.call(build_file.file_ref)
end
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment