def add_missing_groups_and_files!(dry_run: false)
      missing_groups = self.find_missing_groups.to_set
      unless missing_groups.length > 0
        UI.verbose("No missing groups found, so we don't need to worry about adding new groups")
        return false
      end

      # well, we know we have some changes to make, so if this is a dry run,
      # don't bother doing anything and just return true
      return true if dry_run

      missing_groups.each do |missing_group_name|
        new_group = @root_group.new_group(missing_group_name)

        # find every file in the manifest that belongs to the new group, and add it to the new group
        self.manifest_hash.each do |filename, group|
          next unless group.casecmp(missing_group_name.downcase).zero?
          # assumes this is a new file, we don't handle moving files between groups
          new_file_reference = new_group.new_file("#{RELATIVE_SOURCE_FILE_PATH}#{filename}")

          # add references to the target, and make sure they are added to the build phase to
          self.fastlane_runner_target.source_build_phase.add_file_reference(new_file_reference)
        end
      end

      return true # yup, we definitely updated groups
    end
def add_missing_groups_and_files!(dry_run: false)
      missing_groups = self.find_missing_groups.to_set
      unless missing_groups.length > 0
        UI.verbose("No missing groups found, so we don't need to worry about adding new groups")
        return false
      end

      # well, we know we have some changes to make, so if this is a dry run,
      # don't bother doing anything and just return true
      return true if dry_run

      missing_groups.each do |missing_group_name|
        new_group = @root_group.new_group(missing_group_name)

        # find every file in the manifest that belongs to the new group, and add it to the new group
        self.manifest_hash.each do |filename, group|
          next unless group.casecmp(missing_group_name.downcase).zero?
          # assumes this is a new file, we don't handle moving files between groups
          new_file_reference = new_group.new_file("#{RELATIVE_SOURCE_FILE_PATH}#{filename}")

          # add references to the target, and make sure they are added to the build phase to
          self.fastlane_runner_target.source_build_phase.add_file_reference(new_file_reference)
        end
      end

      return true # yup, we definitely updated groups
    end
adds new groups, and the files inside those groups
 Note: this does not add new files to existing groups, that is in add_new_files_to_groups!