Skip to main content

Apple

Scaffold a universal SwiftUI application that shares one codebase across iOS and macOS.

Nova stores the Xcode project as a readable project.yml definition, then generates the disposable .xcodeproj file with XcodeGen.

Why Use This Command?

  1. Creates iOS and macOS targets together so one workspace can serve both Apple platforms.
  2. Includes a Swift Testing target so the generated app starts with a working verification path.
  3. Keeps Xcode build data inside the workspace so local and automated builds do not depend on a global DerivedData location.

Requirements

  • macOS and Xcode — Xcode supplies the Swift compiler, platform SDKs, and xcodebuild.
  • XcodeGen — Install XcodeGen and make xcodegen available on your PATH.
  • Empty directory or monorepo root — Nova auto-detects whether to create a project or add a workspace.

Usage

Options

FlagDescription
-d, --dry-runRun without writing any files.
--name <name>Project slug when creating a new monorepo; omit at an existing root.
--non-interactiveRequire every answer as a flag and do not open prompts.
--workspace-name <name>Workspace directory name and generated Xcode target name.
--output <dir>Output directory.

Output Files

FileDescription
project.ymlXcodeGen definition for the universal app, test target, and scheme.
Sources/App.swiftSwiftUI application entry point.
Sources/ContentView.swiftStarter interface shared by iOS and macOS.
Tests/AppTests.swiftSwift Testing smoke test.
package.jsonNova script groups for project generation, checking, and building.

Non-Interactive Mode

Agents and automation can create the root and first Apple app in one command, or omit --name to add the app from an existing monorepo root.

bash
nova scaffold app apple --non-interactive --name my-apple-app --workspace-name client --output ./my-apple-app
nova scaffold app apple --non-interactive --workspace-name client --output ./apps/client

Registration and Customization

Nova registers the workspace with the app role and trackable policy. The generated package name follows {projectSlug}-app-{workspaceName}.

The starter bundle identifier uses com.example.{workspaceName}. It is recommended to replace that value in project.yml before signing or distributing the app.