Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
The xcode npm package is a library for parsing, modifying, and generating Xcode project files programmatically. It allows developers to manipulate Xcode project settings and configurations without manually editing the project files, which can be error-prone and time-consuming.
Parsing Xcode project files
This feature allows you to parse an existing Xcode project file and work with its contents programmatically.
const xcode = require('xcode');
const fs = require('fs');
const projectPath = 'MyApp.xcodeproj/project.pbxproj';
const project = xcode.project(projectPath);
project.parseSync();
console.log(project);
Adding files to a project
This feature allows you to add new source files to an Xcode project programmatically.
const xcode = require('xcode');
const fs = require('fs');
const projectPath = 'MyApp.xcodeproj/project.pbxproj';
const mySourceFile = 'MyClass.swift';
const project = xcode.project(projectPath);
project.parseSync();
project.addSourceFile(mySourceFile);
fs.writeFileSync(projectPath, project.writeSync());
Adding a framework to a project
This feature allows you to add a framework to an Xcode project programmatically.
const xcode = require('xcode');
const fs = require('fs');
const projectPath = 'MyApp.xcodeproj/project.pbxproj';
const frameworkPath = 'Frameworks/MyFramework.framework';
const project = xcode.project(projectPath);
project.parseSync();
project.addFramework(frameworkPath);
fs.writeFileSync(projectPath, project.writeSync());
Creating a new Xcode project
This feature allows you to create a new Xcode project from scratch programmatically.
const xcode = require('xcode');
const fs = require('fs');
const projectPath = 'MyNewApp.xcodeproj/project.pbxproj';
const project = xcode.project(projectPath);
project.parseSync();
// Add configurations and settings here
fs.writeFileSync(projectPath, project.writeSync());
The pbxproj package is similar to xcode in that it allows for manipulation of Xcode project files. It provides a different API and may have different features or limitations compared to xcode.
tools and utilities for working with xcode/iOS from the command-line
Not much to see yet
FAQs
parser for xcodeproj/project.pbxproj files
The npm package xcode receives a total of 1,427,201 weekly downloads. As such, xcode popularity was classified as popular.
We found that xcode demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 16 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.