code: function addPbxReference(xcodeProject) {
    var fileReferenceSection = nonComments(xcodeProject.pbxFileReferenceSection());
    var entitlementsFileName = path.basename(pathToEntitlementsFile());
  
    if (isPbxReferenceAlreadySet(fileReferenceSection, entitlementsFileName)) {
      console.log('Entitlements file is in reference section.');
      return;
    }
  
    console.log('Entitlements file is not in references section, adding it');
    xcodeProject.addResourceFile(entitlementsFileName);
  }
docs: region PBXReference methods 
  Add .entitlemets file into the project.
  
  @param {Object} xcodeProject - xcode project preferences; all changes are made in that instance