class Xcodeproj::Project::Object::AbstractBuildPhase

Public Instance Methods

add_file_reference_with_uuid(file_ref, uuid, avoid_duplicates = false) click to toggle source

Adds the file reference with given UUID.

@param [String] uuid UUID of the object.

# File lib/cocoaseeds/xcodehelper.rb, line 123
def add_file_reference_with_uuid(file_ref, uuid, avoid_duplicates = false)
  if avoid_duplicates && existing = build_file(file_ref)
    existing
  else
    build_file = project.new_with_uuid(PBXBuildFile, uuid)
    build_file.file_ref = file_ref
    files.insert(0, build_file)
    build_file
  end
end
include_filename?(pattern) click to toggle source

@return whether the file names match the pattern. @param [Regexp] pattern The pattern of file name.

# File lib/cocoaseeds/xcodehelper.rb, line 137
def include_filename?(pattern)
  self.file_display_names.each do |filename|
    return true if filename.match pattern
  end
  false
end