Apache Cordova - Xcode Node

Clone this repo:
  1. c0b7624 chore(deps-dev): bump brace-expansion from 1.1.15 to 1.1.18 (#179) by dependabot[bot] · 9 days ago master
  2. 226c345 chore(deps-dev): bump js-yaml from 4.2.0 to 4.3.1 (#178) by dependabot[bot] · 9 days ago
  3. 4a9fd34 chore: restrict writing to certain object keys (#176) by エリス · 8 weeks ago
  4. 780467c chore(addBuildPhase): remove unused variable buildPhaseSection (#175) by エリス · 8 weeks ago
  5. 81ddc4a fix(addBuildPhase): adding of PBXBuildFile entries to lookup table (#174) by エリス · 8 weeks ago

cordova-node-xcode

npm - Latest GitHub

GitHub - Node Workflow GitHub - Release Audit Workflow Code Coverage

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

Example

const fs = require('node:fs');
const xcode = require('xcode');

// Path to the Xcode project's project.pbxproj file.
const projectPath = 'myproject.xcodeproj/project.pbxproj';
// Create a PBXProject instance for the project.
const myProj = 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');
});