Parser utility for xcodeproj project files
Allows you to edit xcodeproject files and write them back out.
based on donated code from alunny / node-xcode
constfs=require('node:fs');constxcode=require('xcode');// Path to the Xcode project's project.pbxproj file.constprojectPath='myproject.xcodeproj/project.pbxproj';// Create a PBXProject instance for the project.constmyProj=xcode.project(projectPath);// Parse the project file asynchronously before making changes.myProj.parse(function(err){myProj.addHeaderFile('foo.h');myProj.addSourceFile('foo.m');myProj.addFramework('FooKit.framework');// Write the updated project back to disk.fs.writeFileSync(projectPath,myProj.writeSync());console.log('New project written');});