This is an automated email from the ASF dual-hosted git repository. erisu pushed a commit to branch chore/improve-ci-test-build in repository https://gitbox.apache.org/repos/asf/cordova-node-xcode.git
commit cf40d6ffcab7c862d241551049ad0ed98c862c43 Author: Erisu <[email protected]> AuthorDate: Fri Jun 12 16:15:20 2026 +0900 chore: update README.md --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 6cd82a9..d81fe0a 100644 --- a/README.md +++ b/README.md @@ -37,23 +37,23 @@ based on donated code from [alunny / node-xcode](https://github.com/alunny/node- ## Example ```js -// API is a bit wonky right now -var xcode = require('xcode'), - fs = require('fs'), - projectPath = 'myproject.xcodeproj/project.pbxproj', - myProj = xcode.project(projectPath); +const fs = require('node:fs'); +const xcode = require('xcode'); -// parsing is async, in a different process +// 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'); + + console.log('New project written'); }); ``` - -## License - -Apache V2 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
