MAD Designer for macOS is a native AppKit desktop application (macosx SDK, MACOSX_DEPLOYMENT_TARGET = 12.0) for creating, querying, laying out, refreshing, printing, and exporting Mobile Analytics Documents (.mad). It links the same first-party Objective-C frameworks and universal static C libraries (Compressor) that power the iOS apps and the headless engine.
Every .mad file created or edited on macOS is byte-compatible with the iPad/iPhone apps, the mad CLI on Linux, and the mad-action GitHub Action.
brew install --cask mthomason/tap/mad-designer
.dmg or .zip in a browser, run xattr -cr "/Applications/MAD Designer.app" once after copying to /Applications to clear the macOS Gatekeeper quarantine flag.)Each open .mad document runs in a native NSDocument window (MADMacDocument / MADMacWindowController) with a centered Workspace segmented control in the window toolbar (Cmd+1, Cmd+2, Cmd+3) that switches between the three reporting stages:
Cmd+1)
The MAD Query workspace (MADMacQueryViewController) builds the relational query graph stored in RptqQuery. A toggle in the workspace bar switches between two mutually exclusive views of the query:
RptqDatabaseSchemaTable) with column counts and checkmarks for tables currently participating in the query. Double-click any table (or click + Add Table to Query) to add it to the canvas.MADMacQueryCanvasView): Renders each query table as a draggable, resizable card (MADMacQueryTableCardView) over a dot-grid canvas, styled with topological root/child header colors computed by MTGraph.MADMacQueryLinksOverlayView): Dragging from a column in one table card to a column in another creates a join (defaulting to LEFT OUTER), drawn with smooth cubic Bezier curves, directional arrowheads, and pill badges. Clicking or right-clicking a join badge opens a join inspector popover or context menu to change the join type (INNER, LEFT OUTER, RIGHT OUTER, FULL OUTER, CROSS), reverse the join direction, or delete the link.WHERE predicates (Filters (WHERE)), GROUP BY / sort order (Groupings (GROUP BY) — which automatically provisions matching Group Header and Group Footer layout bands), and Arrange Tables for automatic topological card placement.SELECT statement directly.RptqQuery object graph via MADSQLParser, MADSQLStatementResolver, and MADSQLQueryCompiler, preserving the statement in RptqQuery.sqlSourceText.Cmd+2)
The MAD Designer workspace (MADMacDesignerViewController) lays out the report’s parametric bands and elements inside a user-resizable three-pane split view:
Align Left, Center, Right, Top, Middle, Bottom) and Size to Fit.50%–250%) with one-click 100% reset.MADMacDesignerMinimapView): Live proportional bird’s-eye view of all report bands, miniature element blocks, and the active scroll viewport rectangle. Click or drag inside the minimap to jump to and select any band.Report Header, Page Header, any Group Header / Group Footer bands, Report Detail, Page Footer, and Report Footer with element counts, point heights, and page-break indicators. Double-clicking a row toggles section visibility.RptqQueryField columns from the query. Drag any field directly onto a section band on the canvas (or double-click) to create a bound data-field element (RptqDocumentElementLabelDataField).MADMacDesignerCanvasView):
NSView canvas with horizontal and vertical point rulers, paper margin guides, color-coded section headers (RH, PH, GH, DTL, GF, PF, RF), and bottom drag handles for resizing section heights.Shift-click multi-selection, 8-point resize handles, smart alignment guides, grid snapping, inline double-click text editing, cross-section drag-and-drop (-moveElement:toSection:atOrigin:), and full NSUndoManager (Cmd+Z / Cmd+Shift+Z) undo/redo across single and bulk property edits.1 · PAGE & SELECTED SECTION: Configures the target Paper size, displays the active band badge, edits section Height (pt) with a Fit Height button, and toggles Section Visible and Page Break After.2 · SELECTED ELEMENT INSPECTOR: Four contextual cards when an element is selected:
Cmd+D), or deletes (Delete).table.column), aggregate function (SUM, COUNT, AVG, MIN, MAX, STDDEV, VARIANCE) and scope (Report or Group), currency formatting, or barcode symbology (zint).X, Y, W, H), border width/color, padding, and margins.Cmd+3)The MAD Viewer workspace (MADMacViewerViewController) refreshes the query against its live data source, materializes the result set into the local SQLite table cache (MADDataTableFast), and renders paginated pages:
MTPaper): Immediately re-paginates and re-renders the report for US Letter, US Legal, US Tabloid, A3, A4, A5, B4, B5, JIS B4, or JIS B5.Cmd+R): Executes the query through the document’s registered database driver, populates the .maddb / .mdcache companion SQLite cache, computes two-pass groupings and aggregates, and rebuilds the page cache.100%, zoom in, and step through pages (Previous, Page N of M, Next).Cmd+P) & Export (Cmd+E): Prints natively through NSPrintOperation or opens NSSavePanel with a format picker for all seven registered exporters:
.pdf) — native CoreGraphics / AppKit vector PDF via MADReportExporterPDF.html) — positioned page facsimile (MADReportExporterHTML).html) — responsive reflowable semantic HTML (MADReportExporterHTMLFlow).csv) — RFC 4180 detail row export (MADReportExporterCSV).json) — schema contract + detail rows (MADReportExporterJSON).json) — hierarchical sections, groups, and evaluated elements (MADReportExporterJSONReport).txt) — monospace text table (MADReportExporterText)PDFView and reports the rendered page count, cached row count, and paper dimensions in the bottom status bar.MADMacDocumentController): Launching the app without a file presents the macOS Open Report panel filtered to .mad documents (com.everydayapps.productivity.mad and com.thomason.report.mad) with a primary New Document button in the bottom-left bar. Double-clicking any .mad file in Finder opens it directly into its workspace window..mad archive automatically converts its store in place to the portable SQLite schema (MADStoreSchema) via MADStoreConverter.Cmd+N): Clicking New Document (or choosing File → New Document…) opens the database connection assistant (MADMacConnectionWindowController):
.sqlite3 / .db database or enter server host, port, optional SQL Server instance, database name, username, and password..mad file and open it in the MAD Query workspace. Credentials are stored in the macOS Keychain via MADKeyChain.AppKit over Multiplatform FrameworksRather than wrapping the iOS UI in Mac Catalyst, MAD compiles twelve of its fourteen frameworks natively for macosx (SUPPORTED_PLATFORMS = "iphoneos iphonesimulator macosx", MACOSX_DEPLOYMENT_TARGET = 12.0) and puts a purpose-built AppKit document architecture (Mac/Source/) on top:
| Layer | Components | Role on macOS |
|---|---|---|
Static C Libraries (Compressor) |
sqlite3, zlib, openssl, bzip2, libpng, libarchive, freetds, mariadb, postgres, zint |
Universal (arm64 + x86_64) macosx slices inside .xcframework bundles, verified by ./Compressor/build.sh --verify --all --platforms ios,simulator,macosx. |
| Core & Driver Frameworks | MADFoundation, MADDataStructures, MADCocoaExtensions, MADFileManager, MADAPI, MADSqlite3, MADTds, MADTdsClient, MADMySQL, MADPostgres, MADBarcodes, MAD |
Shared Objective-C model, portable SQLite store (Rptq*), SQL parser/compiler, wire database drivers, zint barcode renderer, MADDesignerLayout undo/redo engine, and MADPrintPageRenderer / MADReportExporterPDF. |
Native AppKit Frontend (Mac/) |
MADMacAppDelegate, MADMacAboutWindowController, MADMacDocumentController, MADMacDocument, MADMacWindowController, MADMacConnectionWindowController, MADMacQueryViewController, MADMacDesignerViewController, MADMacDesignerCanvasView, MADMacViewerViewController |
Native NSDocument lifecycle, About / Overview / Acknowledgements window, toolbar & menu bar, visual query canvas, 3-pane report designer with minimap & inspector, and PDFView report viewer. |
The full architectural audit and defect log from the multiplatform port are recorded in docs/project/MAD_MACOS.md.
Open Reports.xcworkspace, select the MAD Designer Mac shared scheme with destination My Mac, and press Run (Cmd+R) to build and debug the native macOS app interactively.
To run any framework’s unit test suite natively on macOS:
xcodebuild test -workspace Reports.xcworkspace -scheme MAD \
-destination 'platform=macOS,arch=arm64' \
-derivedDataPath ~/Library/Developer/Xcode/DerivedData/Reports-cozeiyczmvgrbeapplwfuygymqci
The standalone script Mac/build.sh compiles all twelve macOS frameworks, assembles and signs Mac/build/MAD Designer.app, runs the end-to-end headless + AppKit smoke test suite (Mac/Tests/MADMacSmokeTest.m), and packages distributable .zip and .dmg archives:
./Mac/build.sh # build 12 macOS frameworks + MAD Designer.app
./Mac/build.sh --no-frameworks # rebuild only MAD Designer.app (fast iteration)
./Mac/build.sh --smoke-test # build and run the end-to-end macOS smoke suite
./Mac/build.sh --package # package MAD-Designer-macOS.zip and MAD-Designer-macOS.dmg