How to Build an App From Scratch With AI(Zero Coding)
Based on Prakash Joshi Pax's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
Create a minimal working SwiftUI Mac app in Xcode first, then use Cursor Composer to generate code from plain-language requirements.
Briefing
A practical workflow for building a Mac app from scratch with AI—starting with a minimal, working version and then iterating through prompts—anchors the process. The creator demonstrates this by generating a SwiftUI timer app in Cursor (a VS Code fork with AI features), then repeatedly refining it based on build errors and missing behaviors until it reliably plays an alarm sound and keeps the timer window in front when the countdown ends.
The build starts with a clean Xcode project for a “Mac timer” app, then links that project folder to Cursor. In Cursor’s Composer, the user selects the relevant SwiftUI files (or creates them if needed) and provides a plain-language spec: a modern-looking Mac timer with a default option (customizable in seconds), a stop control, and alarm-like behavior that repeatedly plays a sound until the user stops it—even if the window is minimized or hidden. Cursor generates and edits multiple files, including a new “timer manager” Swift file, and the app is previewed in Xcode.
When SwiftUI errors appear, the workflow treats them as feedback loops rather than blockers. The user copies the compiler error text back into Composer, prompting Cursor to correct platform-specific issues (for example, code that referenced iPhone-only keyboard types). After accepting Cursor’s changes, the app builds successfully. From there, refinement continues: the initial timer only offers a single 5-minute option and lacks polished UI spacing, so new prompts request additional default durations (5, 10, 20 minutes), improved button layout, and audio playback. Cursor adds an MP3 asset (renamed to “alarm.mp3”) and injects audio-player logic so the sound plays repeatedly when the timer finishes.
The same pattern repeats for UI/UX tweaks: if the buttons look wrong or the alarm behavior doesn’t match expectations, the user prompts Cursor to “remove and fix” the issue, rebuilds, and verifies behavior. The result is a functional timer app with default and custom durations, a stop button, and an alarm that continues until stopped, with the timer window brought to the front at completion.
To show the approach scales beyond a toy example, the workflow is applied to “Gen Focus,” a productivity app. Cursor is used to implement a keyboard-navigation feature for task categories: auto-select the first category, provide visual feedback, allow navigation with arrow keys, and select with Return. Cursor edits the category picker and task list view components, but when navigation fails or new SwiftUI errors appear (e.g., missing types), the user cycles through error-copying prompts. The process ends with a working build, and the creator emphasizes a key safeguard: once a version works, save/copy it elsewhere because AI changes can later introduce new breakage.
Overall, the core insight is that coding knowledge isn’t the prerequisite; clear requirements, iterative prompting, and disciplined error-driven correction are. Cursor’s Composer becomes the control center—generate, accept changes, compile, copy errors back, and either keep the fix or discard it and try another approach—until the app behaves exactly as intended.
Cornell Notes
The workflow centers on building a minimal SwiftUI Mac app in Xcode, then using Cursor’s Composer to generate and iteratively improve code from plain-language prompts. After each generation, Xcode compile errors are copied back into Cursor to fix platform-specific or SwiftUI issues, such as iPhone-only APIs used in Mac code. The timer app evolves from a basic countdown into a polished version with multiple default durations, a custom seconds option, repeated alarm playback using an added “alarm.mp3,” and behavior that brings the window to the front when time expires. The same loop is applied to Gen Focus, where Cursor implements keyboard navigation for categories, with additional error-fixing cycles when SwiftUI focus or missing-type errors appear.
How does the workflow turn a plain-language app idea into working SwiftUI code on macOS?
What’s the role of compiler errors in the process?
How does the timer app achieve “alarm-like” repeated sound until the user stops it?
How are UI and UX issues handled after the app already builds?
How does the workflow scale to a more complex productivity feature in Gen Focus?
What safeguard helps prevent losing progress when AI changes break working code?
Review Questions
- When Cursor generates code that compiles on one platform but fails on macOS, what specific step in the workflow is used to correct it?
- Describe how the timer app’s repeated alarm behavior is implemented and how the stop action changes that behavior.
- In Gen Focus, what keyboard interactions are targeted for category selection, and which UI components are modified to support them?
Key Points
- 1
Create a minimal working SwiftUI Mac app in Xcode first, then use Cursor Composer to generate code from plain-language requirements.
- 2
Use Cursor Composer with selected SwiftUI files so the AI has context across multiple files and can edit them coherently.
- 3
Treat Xcode compiler errors as actionable prompts: copy the exact error text back into Composer to drive targeted fixes.
- 4
Iterate on features in layers—start with core functionality, then add default options, UI polish, and audio behavior once the app builds.
- 5
For alarm behavior, add an MP3 asset (renamed to “alarm.mp3”) and implement repeated playback that stops only when the user presses Stop.
- 6
When adding UX features like keyboard navigation, verify focus behavior in the running app; if it fails, prompt Cursor again and resolve new SwiftUI errors.
- 7
Save a known-good version of the code after it works, because later AI edits can introduce new breakage.