Files
StandbyCal/README.md
Maksim Smirnov 8247ccf65f Initial commit
2025-08-04 11:40:58 +02:00

4.8 KiB

StandbyCal

An iOS app for standby calendar functionality, built with SwiftUI and managed by Tuist.

Prerequisites

Before you can build and run this project, you need to have the following tools installed:

1. Homebrew

If you don't have Homebrew installed, install it first: https://brew.sh/

2. mise

Install mise (a tool version manager) via Homebrew:

brew install mise

3. Xcode

Make sure you have Xcode installed from the Mac App Store or Apple Developer portal.

Setup

  1. Clone the repository (if applicable) or navigate to the project directory:

    cd StandbyCal
    
  2. Install Tuist using mise:

    mise install
    

    This will automatically install Tuist as specified in the mise.toml file.

  3. Generate the Xcode project:

    tuist generate
    

Building and Running

Option 1: Using Xcode

Prerequisites

  • Ensure you have completed the Setup steps above
  • Verify that StandbyCal.xcworkspace exists (run tuist generate if missing)

Steps

  1. Open the workspace:
    tuist generate # this will create `StandbyCal.xcworkspace`
    xed StandbyCal.xcworkspace # open in xcode
    

    ⚠️ Important: Always open the .xcworkspace file, not the .xcodeproj file, to ensure all dependencies are properly loaded.

Option 2: Using Command Line

# Build the project
tuist build

# Run tests
tuist test

Project Structure

StandbyCal/
├── README.md
├── mise.toml                    # Tool version management
├── Project.swift               # Tuist project configuration
├── Tuist.swift                # Tuist configuration
├── StandbyCal/                  # Main app target
│   ├── Sources/               # Swift source files
│   │   ├── StandbyCalApp.swift
│   │   └── ContentView.swift
│   ├── Resources/             # App resources
│   │   └── Assets.xcassets/
│   └── Tests/                 # Unit tests
├── StandbyCal.xcworkspace/     # Generated Xcode workspace
└── StandbyCal.xcodeproj/       # Generated Xcode project

Key Configuration Files

Project.swift

This is the main configuration file that defines your project structure, targets, and dependencies. It's written in Swift and uses Tuist's ProjectDescription framework.

Modify this file in order to:

  • Add new targets (frameworks, extensions, etc.)
    .target(
       name: "StandbyCalCore",
       destinations: .iOS,
       product: .framework,
       bundleId: "dev.xmaxsmi.standbycal.core",
       sources: ["StandbyCalCore/Sources/**"],
       dependencies: []
    )
    
  • Update bundle identifiers and app metadata
  • Configure build settings and compiler flags
  • Add external dependencies (SPM packages, frameworks)
       dependencies: [
       .external(name: "Alamofire"),
       .target(name: "StandbyCalCore")
    ]
    
  • Set up different configurations (Debug, Release, etc.)

Project.swift Reference: https://docs.tuist.io/manifests/project Target Configuration: https://docs.tuist.io/manifests/target Dependencies Guide: https://docs.tuist.io/guides/dependencies

Tuist.swift

This file configures Tuist itself and project-wide settings that affect how Tuist generates and manages your project.

Modify this file in order to:

  • Enable/disable Tuist features (caching, selective testing)
  • Define global settings that apply to all projects
  • Configure project generation behavior
  • Set up custom plugins and templates
  • Define environment-specific configurations

Tuist.swift Reference: https://docs.tuist.io/manifests/tuist

Development Workflow

Daily Development

  1. Make changes to your Swift files in the StandbyCal/Sources/ directory
  2. Build and test your changes in Xcode or via command line
  3. Commit your changes (don't commit generated Xcode files)

When Modifying Project Structure

  1. Edit Project.swift to add/remove targets, dependencies, or settings
  2. Regenerate project:
    tuist generate
    # or
    tuist build --generate # generate xcodeproj and immediately build it
    
  3. Verify changes in Xcode and test that everything builds correctly

Best Practices

  • Always regenerate after modifying Project.swift or Tuist.swift
  • Don't commit generated files (.xcodeproj, .xcworkspace) - they're in .gitignore
  • Use tuist clean before regenerating if you encounter issues
  • Keep your Project.swift organized and well-commented
  • Use consistent naming conventions for targets and bundle IDs

Useful Commands

# Clean generated files
tuist clean

# Visualize project dependencies
tuist graph

# Update Tuist to latest version
mise install tuist@latest

# Check mise status
mise current