Skip to main content

Development Setup

Prerequisites

Required Software

SoftwareVersionPurpose
macOS14.0+ (Sonoma)Target platform
Xcode15.0+Development IDE
GitLatestVersion control

Optional Tools

ToolPurpose
SwiftLintCode linting
SwiftFormatCode formatting
HomebrewPackage management
GitHub CLI (gh)Downloads pre-built native libraries from GitHub Releases

Getting Started

Step 1: Clone and Bootstrap

git clone https://github.com/TableProApp/TablePro.git
cd tablepro

# Download pre-built native libraries from GitHub Releases
scripts/download-libs.sh

# Create required build config (empty is fine for development)
touch Secrets.xcconfig

# Install linting/formatting tools
brew install swiftlint swiftformat
Skipping scripts/download-libs.sh leaves Libs/ without binaries, causing linker errors.

Step 2: Open in Xcode

open TablePro.xcodeproj

Step 3: Configure Signing

  1. Select TablePro target
  2. Go to Signing & Capabilities
  3. Change Team to your own Apple Developer account (free account works for development)

Step 4: Build and Run

  1. Select the TablePro scheme
  2. Select My Mac as the destination
  3. Press Cmd+R to build and run
Xcode setup

Project Structure

tablepro
TablePro
Core
Services
Utilities
Models
ViewModels
Extensions
Theme
Resources
Plugins
TableProPluginKit
MySQLDriverPlugin
PostgreSQLDriverPlugin
SQLiteDriverPlugin
ClickHouseDriverPlugin
...
TableProTests
Libs
.swiftlint.yml
.swiftformat

Building

Development Build

# Build for current architecture (Debug)
xcodebuild -project TablePro.xcodeproj -scheme TablePro -configuration Debug build -skipPackagePluginValidation

# Or use Xcode: Cmd+B

Release Build

# Apple Silicon
scripts/build-release.sh arm64

# Intel
scripts/build-release.sh x86_64

# Both architectures
scripts/build-release.sh both
See Building for detailed instructions.

Running Tests

# All tests
xcodebuild -project TablePro.xcodeproj -scheme TablePro test -skipPackagePluginValidation

# Specific test class
xcodebuild -project TablePro.xcodeproj -scheme TablePro test -skipPackagePluginValidation \
    -only-testing:TableProTests/TestClassName

# Specific test method
xcodebuild -project TablePro.xcodeproj -scheme TablePro test -skipPackagePluginValidation \
    -only-testing:TableProTests/TestClassName/testMethodName
Or in Xcode: Product > Test (Cmd+U).

Code Quality

SwiftLint

# Check for issues
swiftlint lint

# Auto-fix fixable issues
swiftlint --fix
SwiftLint also runs automatically during Xcode builds.

SwiftFormat

# Format all code
swiftformat .

# Check without applying
swiftformat --lint .
Run SwiftFormat before committing to keep code style consistent.

Configuration Files

.swiftlint.yml

SwiftLint rules and configuration:
  • Line length limits
  • Function complexity limits
  • Disabled rules
  • Custom rules

.swiftformat

SwiftFormat options:
  • Indentation style
  • Brace placement
  • Import ordering
  • Other formatting rules

Development Workflow

  1. Create feature branch: git checkout -b feature/my-feature
  2. Make changes
  3. Lint: swiftlint lint and swiftformat --lint .
  4. Test: xcodebuild -project TablePro.xcodeproj -scheme TablePro test -skipPackagePluginValidation
  5. Commit: git commit -m "Add my feature"
  6. Push: git push origin feature/my-feature
Logging: Use OSLog with Logger(subsystem: "com.TablePro", category: "Name").

Troubleshooting

Build fails: Clean with Cmd+Shift+K, delete derived data, close/reopen Xcode. SwiftLint errors: Run swiftlint --fix for auto-fixable issues. Missing libraries: Run scripts/download-libs.sh and touch Secrets.xcconfig.