Apache Cordova - Xcode Node

Clone this repo:
  1. 428de2e fix(removeFromPbxSourcesBuildPhase): Remove based on UUID and filename (#204) by エリス · 2 days ago master
  2. 9a0bce2 chore(deps-dev): bump cross-spawn from 7.0.6 to 7.1.2 (#207) by dependabot[bot] · 2 days ago
  3. 8c400bf chore(deps): bump the gh-actions-patch-minor group with 2 updates (#206) by dependabot[bot] · 2 days ago
  4. b591d93 chore(deps): bump the gh-actions-patch-minor group with 2 updates (#205) by dependabot[bot] · 4 weeks ago
  5. 2dd8d31 feat: support 'c', 'cpp', 'cc', 'cxx', 'hpp' extensions (#201) by エリス · 4 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');
});