Learn how to build, run, and debug Dayflow in your local development environment.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/JerryZLiu/Dayflow/llms.txt
Use this file to discover all available pages before exploring further.
Building in Xcode
Select the Dayflow scheme
In Xcode’s toolbar, ensure the Dayflow scheme is selected with My Mac as the destination.
Build the project
Build the app using one of these methods:
- Press
Cmd + B - Select Product → Build from the menu
- Click the Play button (▶) to build and run
Configuring the Run Scheme
Dayflow requires environment variables for AI provider integration. Here’s how to configure them:Add environment variables
- Select Run in the left sidebar
- Click the Arguments tab
- Expand the Environment Variables section
- Click the + button to add variables
Configure AI provider
Add the following environment variables based on your AI provider:
Gemini (Google AI)
| Variable | Value | Description |
|---|---|---|
GEMINI_API_KEY | Your API key | Get from Google AI Studio |
Local Models (Ollama/LM Studio)
No environment variables required. Ensure Ollama or LM Studio is running locally.ChatGPT/Claude (CLI-based)
No environment variables required. Install and authenticate the CLI tools:- ChatGPT: Install Codex CLI and sign in
- Claude: Install Claude Code and sign in
Debugging Tips
Using Xcode Debugger
- Set breakpoints - Click the line number gutter to add breakpoints
- Inspect variables - Hover over variables or use the Variables View when paused
- Debug console - Use
po(print object) command to inspect objects - View hierarchy - Click the Debug View Hierarchy button during runtime to inspect UI
Debug Menu in Dayflow
Dayflow includes built-in developer tools accessible from the menu bar:- View recordings - Click the Dayflow menu bar icon and select “Open Recordings…” to inspect captured video chunks
- Debug UI - The app includes debug views for analyzing the capture and analysis pipeline
- Database inspection - Local database is stored at
~/Library/Application Support/Dayflow/chunks.sqlite
Recording files are saved to
~/Library/Application Support/Dayflow/recordings/Console Logging
View system logs for Dayflow:Common Build Issues
Code signing errors
Code signing errors
Problem: “Signing for ‘Dayflow’ requires a development team.”Solution:
- Select the Dayflow target in Xcode
- Go to Signing & Capabilities tab
- Check Automatically manage signing
- Select your Apple ID team from the dropdown
Missing permissions at runtime
Missing permissions at runtime
Problem: App launches but screen capture is blank.Solution:
- Open System Settings → Privacy & Security → Screen & System Audio Recording
- Enable Dayflow
- Restart the app
Build fails with 'Swift compiler error'
Build fails with 'Swift compiler error'
Problem: Generic Swift compilation errors.Solution:
- Clean build folder: Product → Clean Build Folder (
Cmd + Shift + K) - Delete derived data:
rm -rf ~/Library/Developer/Xcode/DerivedData/Dayflow-* - Restart Xcode and rebuild
Sparkle framework errors
Sparkle framework errors
Problem: Missing or unsigned Sparkle framework.Solution:
Sparkle is included as a dependency. If you encounter issues:
- Ensure you’re using the latest commit from the repository
- Clean and rebuild the project
- Check that
Dayflow/Dayflow.xcodeprojincludes the Sparkle framework
Build Automation
Dayflow includes powerful build automation scripts for creating release builds. These scripts handle building, code signing, notarization, and distribution.Release Scripts Overview
Thescripts/ directory contains automation for the entire release process:
release_dmg.sh
Builds, signs, notarizes, and packages a distribution-ready DMG.
What it does:
- Builds Dayflow in Release configuration with code signing disabled
- Uploads dSYMs to Sentry for crash symbolication (if configured)
- Determines your Developer ID signing identity
- Creates a sanitized app copy without extended attributes
- Re-signs all frameworks (Sparkle, Sentry) and the app bundle with runtime hardening
- Creates a styled DMG with custom background using
create-dmg - Submits the DMG to Apple for notarization
- Staples the notarization ticket to the DMG
SIGN_ID- Developer ID Application identity (auto-detected if not set)NOTARY_PROFILE- Saved notarytool keychain profileNOTARY_APPLE_ID,NOTARY_TEAM_ID,NOTARY_APP_PASSWORD- Alternative notarization credentialsNO_NOTARIZE=1- Skip notarization (for testing)
release.sh
Complete one-button release workflow that orchestrates the entire release process.
What it does:
- Bumps version number (minor by default; use
--majoror--patchto override) - Updates
MARKETING_VERSIONandCURRENT_PROJECT_VERSIONin Xcode project - Syncs
Info.plistvalues - Calls
release_dmg.shto build, sign, and notarize - Signs the update with Sparkle’s
sign_updatetool (EdDSA signature) - Creates a draft GitHub Release and uploads the DMG
- Publishes the release (undrafts)
- Updates
docs/appcast.xmlwith the new version for Sparkle auto-updates - Commits changes and pushes to GitHub
- Xcode + Developer ID certificate in login keychain
sign_update(Sparkle CLI) in PATHghCLI authenticated (gh auth login)- Sparkle private key in Keychain (generated by
generate_keys) create-dmginstalled (brew install create-dmg)
update_appcast.sh
Prepends a new release item to the Sparkle appcast XML feed.
Usage:
The appcast feed is used by Sparkle to notify users of updates. It’s hosted at
https://dayflow.so/appcast.xml via GitHub Pages.Setting Up Release Automation
To use the release scripts, you’ll need to configure credentials:Build Configuration Details
The release scripts use these Xcode build settings:- Scheme:
Dayflow - Configuration:
Release - Derived Data:
build/(local directory) - Code Signing: Disabled during build, applied manually afterward for proper Sparkle/Sentry framework signing
- Hardened Runtime: Enabled with entitlements for Sparkle’s XPC services
Next Steps
- Review Contributing Guidelines before submitting changes
- Read the README for architecture details
- Join discussions on GitHub Issues