# xcode

> parser for xcodeproj/project.pbxproj files

Latest version **3.0.1** (published 2020-05-19) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install xcode
pnpm add xcode
yarn add xcode
bun add xcode
```

## Health

**Score 38/100 (D)** — status: abandoned.

Positive: has types package; no vulnerabilities; high maintenance score; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 3.0.1 |
| Published | 2020-05-19 |
| First published | 2012-01-27 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | separate (@types/xcode) |
| Module format | CommonJS |
| Node | >=10.0.0 |
| Dependencies | 2 |
| Unpacked size | 157.5 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 217 |
| Author | Apache Software Foundation |
| Maintainers | alunny, anis, bowserj, brodybits, cordovaowner, dpogue, erisu, filmaj, janpio, niklasmerz, purplecabbage, shazron, shepheb, stevegill, sujan12, surajpindoria |

## Links

- npm: https://www.npmjs.com/package/xcode
- Repository: https://github.com/apache/cordova-node-xcode
- Homepage: https://github.com/apache/cordova-node-xcode#readme
- Issues: https://github.com/apache/cordova-node-xcode/issues
- npm.io page: https://npm.io/package/xcode

## Dependencies (2)

- [uuid](https://npm.io/package/uuid.md) ^7.0.3
- [simple-plist](https://npm.io/package/simple-plist.md) ^1.1.0

## Recent versions

- 3.0.1 (latest) — 2020-05-19
- 3.0.2-nightly.20251125002453809.sha.e6b981ec (nightly) — 2025-11-25
- 3.0.2-nightly.20251124002730161.sha.e6b981ec — 2025-11-24
- 3.0.2-nightly.20251123002925587.sha.5447827c — 2025-11-23
- 3.0.2-nightly.20251122002424873.sha.c491d3a2 — 2025-11-22
- 3.0.2-nightly.20251121002528744.sha.c491d3a2 — 2025-11-21
- 3.0.2-nightly.20251120002524064.sha.c491d3a2 — 2025-11-20
- 3.0.2-nightly.20251119002618228.sha.c491d3a2 — 2025-11-19
- 3.0.2-nightly.20251118002526729.sha.c491d3a2 — 2025-11-18
- 3.0.2-nightly.20251117002630731.sha.c491d3a2 — 2025-11-17
- 3.0.2-nightly.20251116002746597.sha.c491d3a2 — 2025-11-16
- 3.0.2-nightly.20251115002454896.sha.c491d3a2 — 2025-11-15
- 3.0.2-nightly.20251114002605023.sha.c491d3a2 — 2025-11-14
- 3.0.2-nightly.20251113002531212.sha.c491d3a2 — 2025-11-13
- 3.0.2-nightly.20251112002541218.sha.c491d3a2 — 2025-11-12
- … 1504 more at https://npm.io/package/xcode/versions

## README

<!--
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
#  KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#
-->

# cordova-node-xcode

[![NPM](https://nodei.co/npm/xcode.png?compact=true)](https://nodei.co/npm/xcode/)

[![Node CI](https://github.com/apache/cordova-node-xcode/workflows/Node%20CI/badge.svg?branch=master)](https://github.com/apache/cordova-node-xcode/actions?query=branch%3Amaster)

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](https://github.com/alunny/node-xcode)

## 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);

// parsing is async, in a different process
myProj.parse(function (err) {
    myProj.addHeaderFile('foo.h');
    myProj.addSourceFile('foo.m');
    myProj.addFramework('FooKit.framework');
   
    fs.writeFileSync(projectPath, myProj.writeSync());
    console.log('new project written');
});
```

## Working on the parser

If there's a problem parsing, you will want to edit the grammar under
`lib/parser/pbxproj.pegjs`. You can test it online with the PEGjs online thingy
at https://pegjs.org/online - I have had some mixed results though.

Tests under the `test/parser` directory will compile the parser from the
grammar. Other tests will use the prebuilt parser (`lib/parser/pbxproj.js`).

To rebuild the parser js file after editing the grammar, run:

    npm run pegjs

(and be sure to restore the Apache license notice in
`lib/parser/pbxproj.js` before committing)

## License

Apache V2

---
_Source: https://npm.io/package/xcode · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
