Commit 3ce0785a authored by AliSoftware's avatar AliSoftware

[xcassets] Some protection against potentially trying to remove already-non-existing references

(this was an attempt to get rid of (null) references in the generated Xcode project; it finally wasn't the cause, but keeping the test for safety)
parent 4819a69d
...@@ -176,10 +176,12 @@ module Pod ...@@ -176,10 +176,12 @@ module Pod
# Remove the resources no longer in a target # Remove the resources no longer in a target
refs_to_remove.each do |file_ref| refs_to_remove.each do |file_ref|
native_targets.each do |user_target| native_targets.each do |user_target|
if user_target.resources_build_phase.include?(file_ref)
user_target.resources_build_phase.remove_file_reference(file_ref) user_target.resources_build_phase.remove_file_reference(file_ref)
dirty = true dirty = true
end end
end end
end
dirty dirty
end end
...@@ -191,10 +193,12 @@ module Pod ...@@ -191,10 +193,12 @@ module Pod
def remove_pods_resources def remove_pods_resources
TargetIntegrator.each_pods_resources(user_project) do |file_ref| TargetIntegrator.each_pods_resources(user_project) do |file_ref|
native_targets.each do |user_target| native_targets.each do |user_target|
if user_target.resources_build_phase.include?(file_ref)
user_target.resources_build_phase.remove_file_reference(file_ref) user_target.resources_build_phase.remove_file_reference(file_ref)
end end
end end
end end
end
# Iterate over each file in the 'Pods/Resources' group of the given `project` # Iterate over each file in the 'Pods/Resources' group of the given `project`
# #
......
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