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
-
Clone the repository (if applicable) or navigate to the project directory:
cd StandbyCal -
Install Tuist using mise:
mise installThis will automatically install Tuist as specified in the
mise.tomlfile. -
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.xcworkspaceexists (runtuist generateif missing)
Steps
- Open the workspace:
tuist generate # this will create `StandbyCal.xcworkspace` xed StandbyCal.xcworkspace # open in xcode⚠️ Important: Always open the
.xcworkspacefile, not the.xcodeprojfile, 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
- Make changes to your Swift files in the
StandbyCal/Sources/directory - Build and test your changes in Xcode or via command line
- Commit your changes (don't commit generated Xcode files)
When Modifying Project Structure
- Edit
Project.swiftto add/remove targets, dependencies, or settings - Regenerate project:
tuist generate # or tuist build --generate # generate xcodeproj and immediately build it - Verify changes in Xcode and test that everything builds correctly
Best Practices
- Always regenerate after modifying
Project.swiftorTuist.swift - Don't commit generated files (
.xcodeproj,.xcworkspace) - they're in.gitignore - Use
tuist cleanbefore regenerating if you encounter issues - Keep your
Project.swiftorganized 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