MAD Designer iconMAD

MAD Designer for macOS iconMAD Designer for macOS

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.

Download & Install


Workspaces

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:

1. MAD Query (Cmd+1)

MAD Query workspace on macOS showing the Database Tables list, visual table cards, and LEFT OUTER join connectors

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:


2. MAD Designer (Cmd+2)

MAD Designer workspace on macOS showing the Page & Section Minimap, Report Bands, Query Fields, banded design canvas, and Inspector

The MAD Designer workspace (MADMacDesignerViewController) lays out the report’s parametric bands and elements inside a user-resizable three-pane split view:


3. MAD Viewer (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:


Opening & Creating Documents


Architecture: Native AppKit over Multiplatform Frameworks

Rather 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.


Building, Testing, and Packaging

In Xcode

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

Command-Line Build, Smoke Suite & Release Packaging

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