docs: function (targetFile, configItems, forceRemove) {
          var headers = fs.readFileSync(targetFile, 'utf-8');
          var changed = false;
  
          // always append an empty line at the end
          if (headers[headers.length - 1] !== "\n") {
              headers += "\n";
          }
  
          configItems.forEach(function (item) {
              var content = item.map.content;
              var value = item.data.attrib.value;
  
              if (item.map.type === 'compile-flag') {
                  value = value.toLowerCase();
                  value = value === 'true' || value === 'yes' || value === '1';
              }
  
              if (item.map.format) {
  
                  content = content.format(item.data.attrib);
                  var regexp = new RegExp('#define (.[^ ]*) @?"?(.*)"?', 'gi');
                  var name = regexp.exec(content);
  
                  // check if there were a previous header for that constant
                  if (name) {
                      name = name[1];
  
                      regexp = new RegExp('#define ' + name + ' @?"?(.*)"?\n', 'gi');
                      var existingLine = regexp.exec(headers);
  
                      if (existingLine) {
                          existingLine = existingLine[0];
  
                          if (existingLine !== content + "\n") {
                              // content changed, let's delete the old line
                              headers = headers.replace(regexp, '');
                          }
                      }
                  }
              }
  
              if (forceRemove) {
  
                  content = content.format(item.map.content);
                  var regexp = new RegExp('#define (.[^ ]*).*', 'gi');
                  var name = regexp.exec(content)[1];
  
                  headers = headers.replace(regexp, '');
                  console.log("* removing PCH header " + name);
                  changed = true;
              } else if (headers.indexOf(content) !== -1) {
                  if (value) {
                      // header already present,
                      // nothing to do
                  } else {
                      // removing previously added header
                      headers = headers.replace(content, "");
                      console.log("* updating PCH header " + content);
                      changed = true;
                  }
              } else {
                  if (value) {
                      // adding custom PCH header
                      headers += content + "\n";
                      console.log("* adding PCH header " + content);
                      changed = true;
                  } else {
                      // header is not needed,
                      // nothing to do
                  }
              }
          });
  
          if (changed) {
              fs.writeFileSync(targetFile, headers, 'utf-8');
              console.log("* wrote iOS Prefix.pch header: " + targetFile);
          }
      }