xcode

Best practices and guidelines for Xcode and Apple platform development

View on GitHub
Author Tuist
Namespace @tuist/tuist-marketplace
Category development
Version 1.0.0
Stars 45
Downloads 10
self.md verified
Table of content

Best practices and guidelines for Xcode and Apple platform development

Installation

npx claude-plugins install @tuist/tuist-marketplace/xcode

Contents

Folders: skills

Files: CLAUDE.md, README.md

Documentation

Best practices and guidelines for Xcode and Apple platform development.

Requirements

Installation

/plugin marketplace add tuist/claude-marketplace
/plugin install xcode@tuist-marketplace

Included Skills

This plugin includes 2 skill definitions:

argus

Diagnose xcodebuild builds using argus. Use this instead of parsing xcodebuild output to avoid filling the context window. Query build errors, warnings, slowest targets, bottlenecks, implicit/redundant dependencies, and dependency graph with linking information for optimization analysis.

View skill definition

Argus Build Diagnostics

Use argus to analyze Xcode builds instead of parsing raw xcodebuild output.

Installation

mise install github:tuist/argus@0.4.0

Running a Build

Run xcodebuild with argus intercepting the build:

BUILD_TRACE_ID=$(uuidgen)
XCBBUILDSERVICE_PATH=$(which argus) BUILD_TRACE_ID=$BUILD_TRACE_ID xcodebuild build -scheme MyScheme

Querying Build Results

After the build completes, use these commands to analyze results:

# Get build summary
argus trace summary --build $BUILD_TRACE_ID

# Get compilation errors
argus trace errors --build $BUILD_TRACE_ID

# Get slowest targets
argus trace slowest-targets --build $BUILD_TRACE_ID --limit 5

# Get build bottlenecks
argus trace bottlenecks --build $BUILD_TRACE_ID

Dependency Analysis

Detect dependency issues in your project:

# Show what each target imports
argus trace imports --build $BUILD_TRACE_ID

# Find implicit dependencies (imports not declared as dependencies)
argus trace implicit-deps --build $BUILD_TRACE_ID

# Find redundant dependencies (declared but never imported)
argus trace redundant-deps --build $BUILD_TRACE_ID

Add --json flag for structured output.

Dependency Graph and Linking Analysis

Query the build dependency graph with product type and linking information to identify optimization opportunities:

# Get the full dependency graph with linking info
argus trace graph --build $BUILD_TRACE_ID

# Query what a specific target 

...(truncated)

</details>

### tuist

> Best practices for Tuist projects. Use when working with Tuist manifests, generating projects, or building with xcodebuild in Tuist projects.

<details>
<summary>View skill definition</summary>

# Tuist

## Project Generation

Generate projects without opening Xcode:

```bash
tuist generate --no-open

Target Declaration

Use buildableFolders when declaring targets to avoid regenerating projects on file changes:

let target = Target(
    name: "MyApp",
    destinations: [.iPhone],
    product: .app,
    bundleId: "com.example.app",
    buildableFolders: ["Sources/", "Resources/"]
)

Building with xcodebuild

Pass these build settings to enable caching and improve build performance:

xcodebuild build \
  -scheme MyScheme \
  COMPILATION_CACHE_ENABLE_CACHING=YES \
  CLANG_ENABLE_COMPILE_CACHE=YES \
  SWIFT_ENABLE_EXPLICIT_MODULES=YES \
  SWIFT_USE_INTEGRATED_DRIVER=YES

Disable Signing for CI/Agent Builds

When building through an agent or CI, disable code signing:

xcodebuild build \
  -scheme MyScheme \
  CODE_SIGN_IDENTITY=""

Source

View on GitHub

Tags: development xcodeswiftswiftuiuikitiosmacosapple