Skip to main content

Building TablePro

Development Builds

Using Xcode

  1. Open TablePro.xcodeproj
  2. Select the TablePro scheme
  3. Select My Mac as the destination
  4. Cmd+R to build and run, or Cmd+B to build only

Using Command Line

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

# Build and run
xcodebuild -project TablePro.xcodeproj \
    -scheme TablePro \
    -configuration Debug \
    build \
    -skipPackagePluginValidation && open build/Debug/TablePro.app

Clean Build

If you hit build issues:
# Clean via xcodebuild
xcodebuild -project TablePro.xcodeproj -scheme TablePro clean

# Or clean derived data
rm -rf ~/Library/Developer/Xcode/DerivedData

# Or in Xcode: Cmd+Shift+K

Release Builds

Using the Build Script

# Apple Silicon (M1/M2/M3/M4/M5)
scripts/build-release.sh arm64

# Intel
scripts/build-release.sh x86_64

# Both architectures
scripts/build-release.sh both

Build Script Details

build-release.sh does the following:
  1. Prepares libraries: Extracts the correct architecture from universal libraries
  2. Builds the app: Runs xcodebuild with Release configuration
  3. Copies output: Places the app in build/Release/
  4. Restores icon: Ensures the full app icon is included
  5. Verifies architecture: Confirms the binary matches the target

Output Location

build/Release/TablePro-arm64.app   # Apple Silicon
build/Release/TablePro-x86_64.app  # Intel

Manual Release Build

# Set architecture
ARCH=arm64  # or x86_64

# Build
xcodebuild \
    -project TablePro.xcodeproj \
    -scheme TablePro \
    -configuration Release \
    -arch $ARCH \
    ONLY_ACTIVE_ARCH=YES \
    CODE_SIGN_IDENTITY="" \
    CODE_SIGNING_REQUIRED=NO \
    clean build

Native Libraries

TablePro uses native C libraries for database connectivity. These are hosted on a dedicated GitHub Release and downloaded via scripts/download-libs.sh.

Library Setup

# Download libraries (skips if already present)
scripts/download-libs.sh

# Force re-download
scripts/download-libs.sh --force
The build script (build-release.sh) extracts the correct architecture slice automatically from the universal libraries.

Creating DMG

Using the DMG Script

# Build the release first
scripts/build-release.sh arm64

# Then create DMG
scripts/create-dmg.sh arm64

DMG Contents

  • TablePro.app
  • Applications folder shortcut
  • Background image (if configured)
  • License file (if included)

Output

build/Release/TablePro-arm64.dmg
build/Release/TablePro-x86_64.dmg

Code Signing

Development Builds

Unsigned by default. Fine for local testing.

Release Distribution

To sign (requires Apple Developer account):
# Sign the app
codesign --force --deep --sign "Developer ID Application: Your Name (TEAM_ID)" \
    build/Release/TablePro-arm64.app

# Verify signature
codesign --verify --verbose build/Release/TablePro-arm64.app

Notarization

For distribution outside the App Store:
# Create ZIP for notarization
ditto -c -k --keepParent build/Release/TablePro-arm64.app TablePro.zip

# Submit for notarization
xcrun notarytool submit TablePro.zip \
    --apple-id "[email protected]" \
    --team-id "TEAM_ID" \
    --password "app-specific-password" \
    --wait

# Staple the ticket
xcrun stapler staple build/Release/TablePro-arm64.app

Build Configuration

Build Settings

SettingDebugRelease
OptimizationNone (-O0)Optimize for Speed (-O)
Debug InformationFullStripped
AssertionsEnabledDisabled
Code SigningNoneDeveloper ID (optional)

Architecture Settings

SettingValue
ARCHSStandard (arm64, x86_64)
ONLY_ACTIVE_ARCHYes (Debug), No (Release)
VALID_ARCHSarm64 x86_64

Troubleshooting

Missing libraries: Run scripts/download-libs.sh and verify libraries exist for your architecture. Code signing errors: Build script disables signing. For manual builds, add CODE_SIGN_IDENTITY="" and CODE_SIGNING_REQUIRED=NO. Architecture mismatch: Clean build and ensure libraries match target. Use the build script. Xcode issues: Delete derived data: rm -rf ~/Library/Developer/Xcode/DerivedData

CI/CD

GitHub Actions

Example CI workflow:
name: Build

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  build:
    runs-on: macos-latest
    steps:
      - uses: actions/checkout@v4

      - name: Select Xcode
        run: sudo xcode-select -s /Applications/Xcode_15.0.app

      - name: Build
        run: |
          xcodebuild -project TablePro.xcodeproj \
            -scheme TablePro \
            -configuration Debug \
            build \
            -skipPackagePluginValidation

      - name: Test
        run: |
          xcodebuild -project TablePro.xcodeproj \
            -scheme TablePro \
            test \
            -skipPackagePluginValidation

Release Workflow

release:
  runs-on: macos-latest
  steps:
    - uses: actions/checkout@v4

    - name: Build Release (arm64)
      run: scripts/build-release.sh arm64

    - name: Build Release (x86_64)
      run: scripts/build-release.sh x86_64

    - name: Create DMGs
      run: |
        scripts/create-dmg.sh arm64
        scripts/create-dmg.sh x86_64

    - name: Upload Artifacts
      uses: actions/upload-artifact@v3
      with:
        name: release-dmgs
        path: build/Release/*.dmg

Build Sizes

Typical sizes (v0.1.1):
BuildSize
Debug app~15 MB
Release app~10 MB
DMG (arm64)~3.5 MB
DMG (x86_64)~3.5 MB