diff --git a/lib/censorius.rb b/lib/censorius.rb index 30e0e0d..1242a66 100644 --- a/lib/censorius.rb +++ b/lib/censorius.rb @@ -100,7 +100,17 @@ def generate_paths_group(group) def generate_paths_file_reference(file_reference) project_path = @paths_by_object[file_reference.project.root_object] - @paths_by_object[file_reference] = "#{project_path}/PBXFileReference(#{file_reference.full_path})" + params = [] + if !file_reference.name.nil? && + !file_reference.name.empty? && + file_reference.name != File.basename(file_reference.full_path, '.*') && + file_reference.name != File.basename(file_reference.full_path) + params << "name: #{file_reference.name}" + end + params << "#{file_reference.full_path}" + + # require 'pry'; binding.pry if file_reference.full_path.to_s == '${BUILT_PRODUCTS_DIR}/Zip.framework' + @paths_by_object[file_reference] = "#{project_path}/PBXFileReference(#{params.join(', ')})" end def generate_paths_target_dependency(dependency, parent_path)