-
Notifications
You must be signed in to change notification settings - Fork 0
Project Setup Guide
Narlei Moreira edited this page Aug 6, 2025
·
1 revision
Before starting, ensure you have the following installed:
- Xcode 15.0+: Latest version with iOS 16.0+ support
- macOS 12.0+: Required for Xcode and development tools
- Git: For version control
- Make: Command-line tool (usually pre-installed on macOS)
make devThis single command will:
- ✅ Install Tuist (if not already installed)
- 🧹 Clean any previous cache
- 📦 Generate all modules and workspace
- 🚀 Open the project in Xcode
After running make dev, you should see:
- Xcode opens with
SmartShop.xcworkspace - Project builds successfully
- All modules are visible in the project navigator
If you prefer to run commands individually:
# Install Tuist using the official installer
curl -Ls https://install.tuist.io | bash
# Or using Homebrew
brew install tuist
# Verify installation
tuist --help# Clone the repository
git clone https://github.com/your-username/SmartShop.git
cd SmartShop
# Install Tuist (if not installed globally)
make install
# Generate the project
make generate
# Open in Xcode
make openAfter successful setup, you'll have:
SmartShop/
├── SmartShop.xcworkspace # Main workspace (generated)
├── Modules/
│ ├── App/
│ │ ├── App.xcodeproj # Generated app project
│ │ └── Core/AppDelegate.swift
│ ├── uHome/
│ │ ├── Home.xcodeproj # Generated Home project
│ │ ├── Interface/Sources/
│ │ └── Implementation/Sources/
│ └── uNetwork/
│ ├── Network.xcodeproj # Generated Network project
│ ├── Interface/Sources/
│ └── Implementation/Sources/
├── Tuist/
│ └── ProjectDescriptionHelpers/
├── Makefile
└── Workspace.swift
make dev # Complete setup: install + generate + open
make generate # Generate all projects and workspace
make open # Open workspace in Xcode
make build # Build the entire project
make test # Run all testsmake clean # Clean Tuist cache
make clean-all # Remove all generated files and cache
make status # Check project status
make help # Show all available commands# Error: command not found: tuist
# Solution: Install Tuist
curl -Ls https://install.tuist.io | bash
source ~/.zshrc # or ~/.bash_profile# Error: Permission denied
# Solution: Fix permissions
chmod +x Makefile
sudo xcode-select --install# Error: xcode-select: error: tool 'xcodebuild' requires Xcode
# Solution: Install Xcode Command Line Tools
xcode-select --install# Error: Build failures or stale cache
# Solution: Clean everything
make clean-all
make generate# Error: Module not found or dependency issues
# Solution: Clean and regenerate
tuist clean
tuist generate --no-opentuist --version
# Expected output: 4.x.x or latermake status
# Expected output:
# 📊 Project status:
# - Tuist installed: ✅
# - Project generated: ✅
# - Modules:
# - uHome: ✅
# - uNetwork: ✅make build
# Should complete without errorsmake test
# All tests should pass# Start of day
make dev
# After changes to Project.swift files
make generate
# Before committing
make test
make build- Update the relevant
Project.swiftfile - Run
make generateto update projects - Open workspace and verify new dependencies
- Each module has its own Xcode project
- The workspace combines all modules
- Build and test individual modules independently
- Use the workspace for integration testing
After opening the workspace, configure Xcode:
- Xcode → Preferences → Locations
- Ensure Command Line Tools points to current Xcode
- Xcode → Preferences → Source Control
- Enable source control for better Git integration
- Xcode → Preferences → Text Editing
- Enable line numbers, code folding, and syntax highlighting
- SwiftLint: Code style enforcement
- SwiftFormat: Automatic code formatting
- Tuist Plugin: Enhanced Tuist integration (if available)
# Run the same checks as CI
make install
make generate
make build
make testThe project includes CI/CD configuration. See Continuous Integration for details.
# Set in ~/.zshrc or ~/.bash_profile
# Tuist cache directory (optional)
export TUIST_CACHE_PATH="$HOME/.tuist-cache"
# Xcode developer directory (if multiple Xcode versions)
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"# Use Tuist caching
tuist cache warm
# Parallel builds (automatic with workspace)
# Individual module builds are parallelized- Use selective builds when working on specific modules
- Leverage Tuist's caching for faster generation
- Keep dependencies minimal and focused
After successful setup:
- 📖 Read uFeature Concept to understand the architecture
- 🏗️ Explore Modular Architecture for implementation details
- 🧪 Learn about Testing Strategy for quality assurance
- ⚡ Familiarize yourself with Makefile Automation
- 👤 Author: Narlei Moreira
- 📧 Project questions welcome on LinkedIn
Next: Makefile Automation