def remove_target(name)
      found_target = targets.find {|target| target.name == name }
      if found_target
        @project.properties['targets'].delete found_target.identifier
        @registry.remove_object found_target.identifier
      end
      found_target
    end
def remove_target(name)
      found_target = targets.find {|target| target.name == name }
      if found_target
        @project.properties['targets'].delete found_target.identifier
        @registry.remove_object found_target.identifier
      end
      found_target
    end
Remove a target from the Xcode project.

 @note this will remove the first target that matches the specified name.

 @note this will remove only the project entry at the moment and not the
   the files that may be associated with the target. All build phases,
   build files, and configurations will automatically be cleaned up when
   Xcode is opened.

 @param [String] name the name of the target to remove from the Xcode
   project.

 @return [Target] the target that has been removed.