The Problem
Marketing teams and product demos often need short, polished videos that show an iPhone screen recording inside a realistic device frame, with zooms, tap‑feedback, and custom backgrounds. Producing this manually in a video editor is time‑consuming and error‑prone, especially when the same raw clip must be re‑used for multiple aspect‑ratios and social platforms.
What This Does
Maya is a native macOS app that wraps a screen‑recording (.mov) in a selectable device mock‑up, lets the user add speed changes, zoom keyframes, and tap‑feedback, then exports a ready‑to‑share video. The UI lives in Maya/Views/ (e.g., CanvasView.swift, TimelineView.swift). Core data models such as Project.swift, ZoomKeyframe.swift, and TapEvent.swift live in Maya/Models/. Business logic for compositing frames, sampling animations, and writing the final file resides in Maya/Services/ (DeviceFrameCompositor.swift, ExportService.swift, AnimationSampler.swift). Asset catalogs under Maya/Assets.xcassets/ provide the device frames and icons, while preset video previews are stored in Maya/Resources/PresetPreviews/.
How It Is Wired
Entry point – Maya/MayaApp.swift declares @main and launches ContentView.
UI → Model – CanvasView.swift displays the current Project (from Maya/Models/Project.swift). Controls in the sidebar (SettingsSidebar.swift) mutate the Project via SwiftUI bindings.
Model → Service – When the user clicks Export, ExportService.export(project:completion:) in Maya/Services/ExportService.swift is invoked. It:
- Calls
DeviceFrameCompositor.compose(project:)to rasterise the selected device frame, background, and drop‑shadow into a CoreGraphics canvas. - Uses
AnimationSampler.sampleZooms(for:)to generate per‑frame transform matrices fromZoomKeyframedata. - Retrieves video thumbnails via
VideoThumbnailGenerator.generate(for:)(used only for the timeline UI).
Compositor → Disk – DeviceFrameCompositor writes the final composition to a temporary AVAssetWriter and hands the output URL back to ExportService, which moves the file to the user‑chosen location.
Side effects – The only external side‑effects are file reads (input video, assets in Assets.xcassets) and a single file write (the exported .mov). No network calls or persistent databases are involved.
Hub – ExportService is the widest‑impact component; changes here affect UI export flow, video encoding settings, and error handling. The rest of the codebase is largely UI‑centric with limited cross‑module coupling.
How To Use It
# Clone the repo
git clone https://github.com/moses-y/Maya.git
cd Maya
# Open the Xcode project (requires macOS 13.3+)
open Maya.xcodeproj
# Build and run from Xcode (Cmd‑R) or use the provided script for a release build
./scripts/build-release.sh # produces Maya.dmg in ./build
No additional configuration files, environment variables, or API keys are required. The app is signed and notarized in the release DMG, but a developer build runs unsandboxed on a local machine.
Real‑World Use
A product team records a new feature walkthrough on an iPhone, drags the .mov into Maya, selects the iPhone 17 Pro‑Cosmic Orange frame, adds a 2‑second zoom on the “Settings” button, places a ripple tap on the “Save” icon, and exports a 1080p HEVC video. The resulting clip is uploaded directly to the company’s social‑media scheduler.
Code Health & Issues
- Low – No test coverage – only 1 test file exists (
MayaTests/...), leaving most logic unverified. - Low – CI limited to release workflow –
.github/workflows/release.ymlruns a build but no unit or UI test suite. - Low – Documentation limited to README and static site – no API docs or architecture diagram.
All expected files (license, lockfile, CI config) are present; static analysis reports no structural red flags.
The Bottom Line
Maya delivers a focused, macOS‑only workflow for turning iPhone screen recordings into marketing‑ready videos with minimal external dependencies. The code is cleanly split between UI, model, and service layers, but test coverage and CI depth are thin. It is a solid base for teams that need a quick in‑house video‑framing tool and are comfortable extending SwiftUI code if additional features are required.