def create_build_phase(phase_name)
      
      # Register a BuildPhase with the default properties specified by the name.
      build_phase = @registry.add_object(BuildPhase.send("#{phase_name}"))
      
      # Add the build phase to the list of build phases for this target.
      # @todo this is being done commonly in the application in multiple places
      #   and it bugs me. Perhaps some special module could be mixed into the
      #   Array of results that are returned.
      @properties['buildPhases'] << build_phase.identifier
      
      yield build_phase if block_given?
      
      build_phase.save!
    end
def create_build_phase(phase_name)
      
      # Register a BuildPhase with the default properties specified by the name.
      build_phase = @registry.add_object(BuildPhase.send("#{phase_name}"))
      
      # Add the build phase to the list of build phases for this target.
      # @todo this is being done commonly in the application in multiple places
      #   and it bugs me. Perhaps some special module could be mixed into the
      #   Array of results that are returned.
      @properties['buildPhases'] << build_phase.identifier
      
      yield build_phase if block_given?
      
      build_phase.save!
    end
Create a build phase with the given name. Available build phases:

 * sources
 * resources
 * framework
 * run_script
 * copy_headers

 @example Creating the sources build phase

     target.create_build_phase :sources

 @example Creating the resources build phase (with optional block)

     target.create_build_phase :resources do |phase|
       # each phase that is created.
     end

 @param [String] phase_name the name of the phase to add to the target
 @return [BuildPhase] the BuildPhase that is created